/* Najibul Truth System - Core Stylesheet */
:root {
  --nts-primary: #2563eb;
  --nts-primary-dark: #1d4ed8;
  --nts-success: #10b981;
  --nts-success-dark: #059669;
  --nts-warning: #f59e0b;
  --nts-warning-dark: #d97706;
  --nts-danger: #ef4444;
  --nts-danger-dark: #dc2626;
  --nts-bg-glass: rgba(255, 255, 255, 0.92);
  --nts-border-glass: rgba(226, 232, 240, 0.8);
  --nts-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --nts-shadow-md: 0 4px 14px rgba(0, 0, 0, 0.08);
  --nts-shadow-lg: 0 12px 30px rgba(0, 0, 0, 0.12);
  --nts-radius: 12px;
}

/* ==========================================================================
   COMMAND CENTER & ADMIN DASHBOARD
   ========================================================================== */
.nts-admin-wrap {
  max-width: 1300px;
  margin: 25px auto 40px auto;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}
.nts-admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 25px;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: #fff;
  padding: 24px 30px;
  border-radius: var(--nts-radius);
  box-shadow: var(--nts-shadow-md);
}
.nts-admin-header .nts-header-left {
  display: flex;
  align-items: center;
  gap: 18px;
}
.nts-admin-header .nts-header-icon {
  font-size: 42px;
  width: 42px;
  height: 42px;
  color: #38bdf8;
}
.nts-admin-header h1 {
  color: #fff;
  margin: 0;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.2;
}
.nts-admin-header .nts-sub {
  margin: 4px 0 0;
  color: #94a3b8;
  font-size: 14px;
}

/* KPI Cards */
.nts-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}
.nts-kpi-card {
  background: #fff;
  border-radius: var(--nts-radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px solid var(--nts-border-glass);
  box-shadow: var(--nts-shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}
.nts-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--nts-shadow-md);
}
.nts-kpi-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nts-kpi-icon span {
  font-size: 24px;
  width: 24px;
  height: 24px;
}
.nts-card-verified .nts-kpi-icon { background: #d1fae5; color: #059669; }
.nts-card-pending .nts-kpi-icon { background: #fef3c7; color: #d97706; }
.nts-card-revisions .nts-kpi-icon { background: #e0e7ff; color: #4338ca; }
.nts-card-locks .nts-kpi-icon { background: #fee2e2; color: #dc2626; }
.nts-kpi-value { font-size: 28px; font-weight: 800; color: #0f172a; line-height: 1; }
.nts-kpi-label { font-size: 13px; color: #64748b; margin-top: 5px; font-weight: 500; }

.nts-dashboard-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
@media (max-width: 900px) {
  .nts-dashboard-columns { grid-template-columns: 1fr; }
}
.nts-panel {
  background: #fff;
  border-radius: var(--nts-radius);
  border: 1px solid var(--nts-border-glass);
  padding: 24px;
  box-shadow: var(--nts-shadow-sm);
}
.nts-panel h2 {
  margin: 0 0 16px;
  font-size: 17px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #1e293b;
}

/* ==========================================================================
   WORKBENCH DASHBOARD
   ========================================================================== */
.nts-workbench-wrap {
  max-width: 1400px;
  margin: 20px auto 40px auto;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.nts-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  padding: 16px 24px;
  border-radius: var(--nts-radius);
  border: 1px solid var(--nts-border-glass);
  box-shadow: var(--nts-shadow-sm);
  margin-bottom: 20px;
}
.nts-header-left { display: flex; align-items: center; gap: 14px; }
.nts-badge-logo {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nts-badge-logo span { font-size: 24px; width: 24px; height: 24px; }
.nts-title { margin: 0; font-size: 20px; font-weight: 700; color: #0f172a; }
.nts-subtitle { margin: 2px 0 0; font-size: 13px; color: #64748b; }
.nts-header-right { display: flex; align-items: center; gap: 12px; }
.nts-user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f1f5f9;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  color: #334155;
}
.nts-role-badge {
  background: #2563eb;
  color: #fff;
  font-size: 10px;
  text-transform: uppercase;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
}
.nts-btn-refresh {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #334155;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}
.nts-btn-refresh:hover { background: #e2e8f0; }

/* Tabs Nav */
.nts-tabs-nav {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 2px;
}
.nts-tab-btn {
  background: transparent;
  border: none;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  transition: color 0.2s;
}
.nts-tab-btn:hover { color: #1e293b; }
.nts-tab-btn.active { color: #2563eb; }
.nts-tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 3px;
  background: #2563eb;
  border-radius: 2px;
}
.nts-pill-count {
  background: #e2e8f0;
  color: #475569;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
}
.nts-pill-active { background: #fee2e2; color: #dc2626; }

/* Filter Bar */
.nts-filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 15px;
}
.nts-search-box {
  position: relative;
  flex: 1;
  max-width: 400px;
}
.nts-search-box span {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
}
.nts-search-box input {
  width: 100%;
  padding: 9px 12px 9px 36px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 14px;
  box-sizing: border-box;
}

/* Post Queue Cards Grid */
.nts-queue-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}
.nts-post-card {
  background: #fff;
  border-radius: var(--nts-radius);
  border: 1px solid var(--nts-border-glass);
  box-shadow: var(--nts-shadow-sm);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}
.nts-post-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--nts-shadow-md);
}
.nts-card-locked { border-left: 4px solid #ef4444; }
.nts-card-my-lock { border-left: 4px solid #3b82f6; background: #f8fafc; }
.nts-card-verified-border { border-left: 4px solid #10b981; }

.nts-card-top { margin-bottom: 14px; }
.nts-status-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 6px;
  margin-bottom: 10px;
}
.nts-status-pending { background: #fef3c7; color: #b45309; }
.nts-status-verified { background: #d1fae5; color: #065f46; }
.nts-status-revision { background: #e0e7ff; color: #3730a3; }
.nts-status-rejected { background: #fee2e2; color: #991b1b; }

.nts-post-card-title {
  font-size: 16px;
  font-weight: 600;
  color: #0f172a;
  margin: 0 0 8px 0;
  line-height: 1.4;
}
.nts-post-card-meta {
  font-size: 12px;
  color: #64748b;
  display: flex;
  gap: 12px;
  align-items: center;
}
.nts-card-lock-notice {
  background: #fee2e2;
  color: #991b1b;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 6px;
  margin: 10px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.nts-my-lease-timer {
  background: #dbeafe;
  color: #1e40af;
  font-weight: 700;
  font-size: 13px;
  padding: 8px 12px;
  border-radius: 6px;
  margin: 10px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nts-card-footer {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.nts-btn-claim, .nts-btn-review {
  background: var(--nts-primary);
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s;
}
.nts-btn-claim:hover, .nts-btn-review:hover { background: var(--nts-primary-dark); }
.nts-btn-release-small {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}
.nts-btn-release-small:hover { background: #e2e8f0; }

/* ==========================================================================
   DISTRACTION-FREE REVIEW MODAL / DRAWER
   ========================================================================== */
.nts-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(4px);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.nts-modal-container {
  background: #fff;
  width: 95vw;
  max-width: 1400px;
  height: 92vh;
  border-radius: var(--nts-radius);
  box-shadow: var(--nts-shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: ntsPopIn 0.25s ease-out;
}
@keyframes ntsPopIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}
.nts-modal-header {
  background: #0f172a;
  color: #fff;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.nts-modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 70%;
}
.nts-modal-badge {
  background: #334155;
  color: #38bdf8;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
}
.nts-modal-header h2 {
  color: #fff;
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nts-modal-actions-right {
  display: flex;
  align-items: center;
  gap: 14px;
}
.nts-countdown-box {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid #ef4444;
  color: #fca5a5;
  padding: 6px 12px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
}
.nts-countdown-box .nts-timer { color: #fff; font-size: 15px; font-variant-numeric: tabular-nums; }
.nts-btn-extend {
  background: #ef4444;
  color: #fff;
  border: none;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nts-btn-close-modal {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
}
.nts-btn-close-modal:hover { color: #fff; }

.nts-modal-body {
  flex: 1;
  display: flex;
  overflow: hidden;
}
.nts-modal-content-pane {
  flex: 65;
  padding: 24px 30px;
  overflow-y: auto;
  border-right: 1px solid #e2e8f0;
}
.nts-meta-strip {
  display: flex;
  gap: 16px;
  padding-bottom: 16px;
  margin-bottom: 20px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 13px;
  color: #64748b;
  flex-wrap: wrap;
}
.nts-meta-item { display: flex; align-items: center; gap: 6px; }
.nts-article-body {
  font-size: 16px;
  line-height: 1.7;
  color: #1e293b;
  margin-bottom: 30px;
}
.nts-extracted-sources-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px;
}
.nts-extracted-sources-box h3 {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #334155;
}
.nts-sources-list {
  margin: 0;
  padding-left: 20px;
  font-size: 13px;
}
.nts-sources-list li { margin-bottom: 6px; word-break: break-all; }

/* Right Inspector Pane */
.nts-modal-inspector-pane {
  flex: 35;
  padding: 24px;
  background: #fafafa;
  overflow-y: auto;
}
.nts-inspector-card h3 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}
.nts-card-hint {
  font-size: 12px;
  color: #64748b;
  margin: 0 0 16px;
}
.nts-checklist-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}
.nts-checkbox-row {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s;
}
.nts-checkbox-row:hover { border-color: #cbd5e1; }
.nts-checkbox-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  cursor: pointer;
}
.nts-check-label strong {
  display: block;
  font-size: 13px;
  color: #1e293b;
}
.nts-check-label span {
  display: block;
  font-size: 11px;
  color: #64748b;
  margin-top: 2px;
  line-height: 1.4;
}

.nts-editorial-notes-box {
  margin-bottom: 20px;
}
.nts-editorial-notes-box label {
  display: block;
  font-size: 13px;
  color: #1e293b;
  margin-bottom: 6px;
}
.nts-editorial-notes-box textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 10px;
  font-size: 13px;
  box-sizing: border-box;
}

.nts-decision-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.nts-btn {
  width: 100%;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
}
.nts-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.nts-btn-verify {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
}
.nts-btn-verify:not(:disabled):hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}
.nts-btn-revision {
  background: #f59e0b;
  color: #fff;
}
.nts-btn-revision:hover { background: #d97706; }
.nts-btn-reject {
  background: #ef4444;
  color: #fff;
}
.nts-btn-reject:hover { background: #dc2626; }
.nts-btn-release {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}
.nts-btn-release:hover { background: #e2e8f0; }

/* ==========================================================================
   FRONTEND TRUTH BADGE
   ========================================================================== */
.nts-truth-badge-card {
  background: linear-gradient(135deg, #f0fdf4 0%, #e6f7ec 100%);
  border: 1px solid #86efac;
  border-radius: var(--nts-radius);
  padding: 18px 24px;
  margin: 28px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--nts-shadow-sm);
  position: relative;
  overflow: hidden;
}
.nts-truth-badge-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 6px;
  height: 100%;
  background: #10b981;
}
.nts-badge-left {
  display: flex;
  align-items: center;
  gap: 16px;
}
.nts-seal-icon {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
}
.nts-svg-shield {
  width: 100%;
  height: 100%;
}
.nts-badge-headline {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.nts-badge-title {
  font-size: 16px;
  font-weight: 700;
  color: #065f46;
}
.nts-cert-pill {
  background: #047857;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  letter-spacing: 0.5px;
}
.nts-badge-sub {
  font-size: 13px;
  color: #047857;
  margin-top: 3px;
}
.nts-btn-certificate-trigger {
  background: #047857;
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
  box-shadow: 0 2px 6px rgba(4, 120, 87, 0.2);
  white-space: nowrap;
}
.nts-btn-certificate-trigger:hover {
  background: #065f46;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(4, 120, 87, 0.3);
}

/* Frontend Alert Banners */
.nts-notice-banner {
  border-radius: var(--nts-radius);
  padding: 16px 20px;
  margin: 20px 0;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.nts-notice-warning {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}
.nts-notice-danger {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

/* ==========================================================================
   FRONTEND CERTIFICATE POPUP MODAL
   ========================================================================== */
.nts-cert-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(6px);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.nts-cert-wrapper {
  position: relative;
  max-width: 800px;
  width: 100%;
}
.nts-cert-close-btn {
  position: absolute;
  top: -42px;
  right: 0;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 36px;
  cursor: pointer;
}
.nts-certificate-frame {
  background: #ffffff;
  border: 12px double #d97706;
  border-radius: 8px;
  padding: 40px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  text-align: center;
  position: relative;
  box-sizing: border-box;
}
.nts-gold-seal-svg {
  width: 68px;
  height: 68px;
  margin-bottom: 10px;
}
.nts-cert-brand {
  font-size: 12px;
  letter-spacing: 2px;
  font-weight: 800;
  color: #92400e;
  text-transform: uppercase;
}
.nts-cert-headline {
  font-family: Georgia, serif;
  font-size: 22px;
  font-weight: 700;
  color: #1e293b;
  margin: 10px 0 16px;
  letter-spacing: 0.5px;
}
.nts-cert-divider {
  width: 80px;
  height: 2px;
  background: #f59e0b;
  margin: 0 auto 20px auto;
}
.nts-cert-intro {
  font-size: 14px;
  color: #64748b;
  max-width: 580px;
  margin: 0 auto 16px auto;
  line-height: 1.5;
}
.nts-cert-work-title {
  font-family: Georgia, serif;
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
  margin: 14px 0 20px;
}
.nts-cert-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  background: #fffbeb;
  border: 1px solid #fef3c7;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 24px;
}
.nts-meta-label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  color: #92400e;
  font-weight: 600;
}
.nts-meta-val {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
  margin-top: 4px;
}
.nts-cert-id-code {
  color: #047857;
  font-family: monospace;
}
.nts-cert-pillars-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.nts-pillar-badge {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.nts-cert-pledge {
  font-size: 12px;
  font-style: italic;
  color: #64748b;
  margin-bottom: 28px;
}
.nts-cert-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-top: 1px solid #f1f5f9;
  padding-top: 20px;
}
.nts-cert-sig-box { text-align: left; }
.nts-cert-sig-line { width: 180px; height: 1px; background: #0f172a; margin-bottom: 6px; }
.nts-sig-title { font-size: 12px; font-weight: 700; color: #0f172a; }
.nts-sig-sub { font-size: 11px; color: #64748b; }
.nts-btn-print-cert {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #334155;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

@media print {
  body * { visibility: hidden; }
  #nts-certificate-print-area, #nts-certificate-print-area * { visibility: visible; }
  #nts-certificate-print-area { position: absolute; left: 0; top: 0; width: 100%; border: 6px double #d97706; }
  .nts-cert-close-btn, .nts-cert-actions { display: none !important; }
}
