/* ═══════════════════════════════════════════════════════════════════
   dashboard.css
   Dashboard index page styles — loaded only on the admin index.
   Place at:  static/admin/css/dashboard.css
═══════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

* {
  box-sizing: border-box;
}

body,
html {
  font-family: 'Poppins' !important;
  font-weight: 400 !important;
}


/* ─────────────────────────────────────────────
   ERROR BANNER
───────────────────────────────────────────── */
.db-error-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff0f0;
  color: var(--clr-red);
  border: 1px solid #fcc;
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-size: 0.82rem;
  margin-bottom: 16px;
}

/* ─────────────────────────────────────────────
   DATE / SUBTITLE STRIP
───────────────────────────────────────────── */
.dash-subtitle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: #1d4ed8;
  margin-bottom: 20px;
}

.dash-subtitle__icon {
  flex-shrink: 0;
  color: #1d4ed8;
}

.dash-subtitle__sep {
  opacity: 0.5;
}

/* ─────────────────────────────────────────────
   SHARED CARD BASE
───────────────────────────────────────────── */
.dash-card {
  background: var(--clr-card);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--clr-border);
  transition: transform var(--duration) var(--ease),
    box-shadow var(--duration) var(--ease);
}

.dash-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.dash-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.dash-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--clr-text-900);
}

.dash-card-more {
  border: none;
  background: none;
  color: var(--clr-text-300);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  transition: color var(--duration) var(--ease);
}

.dash-card-more:hover {
  color: var(--clr-text-900);
}

.dash-card-link {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--clr-green-600);
  text-decoration: none;
  transition: color var(--duration) var(--ease);
}

.dash-card-link:hover {
  color: var(--clr-green-900);
}

.dash-card-divider {
  height: 1px;
  background: var(--clr-border);
  margin: 16px 0;
}

.dash-sub-heading {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--clr-text-300);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}

/* ─────────────────────────────────────────────
   ROW 1 — KPI CARDS
───────────────────────────────────────────── */
.kpi-row {
  display: grid;
  grid-template-columns: 260px 1fr 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.kpi-card {
  background: var(--clr-card);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--clr-border);
  transition: transform var(--duration) var(--ease),
    box-shadow var(--duration) var(--ease);
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.kpi-card--highlight {
  background: white;
  border-color: rgba(184, 1, 0, 0.25);
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #1d4ed8;
}

.kpi-update-dot {
  width: 8px;
  height: 8px;
  background: #1d4ed8;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(184, 1, 0, 0.25);
  margin-bottom: 2px;
}

.kpi-update-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #1d4ed8;
}

.kpi-update-date {
  font-size: 0.8rem;
  color: rgb(24 10 10 / 55%);
}

.kpi-update-text {
  font-size: 0.9rem;
  line-height: 1.6;
  color: rgb(26 11 11 / 88%);
  flex: 1;
}

.kpi-update-text strong {
  color: #fff;
}

.kpi-see-btn {
  display: inline-flex;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 6px 3px;
  align-self: flex-start;
  transition: background var(--duration) var(--ease);
}

.kpi-see-btn:hover {
  background: rgba(255, 255, 255, 0.22);
}

.kpi-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.kpi-label {
  font-size: 0.75rem;
  color: var(--clr-text-300);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.kpi-more-link {
  font-size: 1rem;
  color: var(--clr-text-300);
  text-decoration: none;
  transition: color var(--duration) var(--ease);
}

.kpi-more-link:hover {
  color: var(--clr-green-600);
}

.kpi-value {
  font-size: 2.1rem;
  font-weight: 700;
  color: var(--clr-text-900);
  letter-spacing: -0.02em;
  min-height: 42px;
  display: flex;
  align-items: center;
}

.kpi-skeleton {
  height: 32px;
  width: 100px;
  background: linear-gradient(90deg, #eeeeee 25%, #f8f8f8 50%, #eeeeee 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 6px;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

.kpi-trend {
  font-size: 0.78rem;
  margin-top: 6px;
}

.trend-up {
  color: var(--clr-green-600);
}

.trend-down {
  color: var(--clr-red);
}

.trend-neutral {
  color: var(--clr-text-300);
}

/* ─────────────────────────────────────────────
   ROW 1b — STAT PILLS
───────────────────────────────────────────── */
.stat-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.stat-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--clr-card);
  border: 1px solid #f3c5c5;
  border-radius: 30px;
  padding: 6px 14px 6px 8px;
  font-size: 0.8rem;
  transition: border-color var(--duration) var(--ease), transform var(--duration) var(--ease);
}

.stat-pill:hover {
  border-color: var(--clr-green-200);
  transform: translateY(-1px);
}

.stat-pill__icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-pill__icon--draft {
  background: var(--clr-green-50);
  color: var(--clr-green-600);
}

.stat-pill__icon--scheduled {
  background: #e8f4ff;
  color: #162c6b;
}

.stat-pill__icon--archived {
  background: #f0f0f8;
  color: #6b6ba8;
}

.stat-pill__icon--rejected {
  background: #fff0f0;
  color: var(--clr-red);
}

.stat-pill__icon--paid {
  background: #fff8e6;
  color: var(--clr-amber);
}

.stat-pill__icon--overdue {
  background: #fff2e6;
  color: #c95c00;
}

.stat-pill__icon--authors {
  background: var(--clr-green-50);
  color: var(--clr-green-600);
}

.stat-pill__icon--categories {
  background: #f4e8ff;
  color: #7c3aed;
}

.stat-pill__val {
  font-weight: 700;
  color: var(--clr-text-900);
  font-size: 0.85rem;
}

.stat-pill__label {
  color: var(--clr-text-300);
}

/* ─────────────────────────────────────────────
   ROW 2 — TABLE + BAR CHART
───────────────────────────────────────────── */
.dash-mid-row {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 16px;
  margin-bottom: 20px;
}

.articles-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.81rem;
}

.articles-table th {
  color: var(--clr-text-300);
  font-weight: 600;
  padding: 0 10px 10px 0;
  text-align: left;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--clr-border);
  white-space: nowrap;
}

.articles-table td {
  padding: 10px 10px 10px 0;
  border-bottom: 1px solid var(--clr-border);
  color: var(--clr-text-500);
  vertical-align: middle;
}

.articles-table tbody tr:last-child td {
  border-bottom: none;
}

.articles-table tbody tr {
  transition: background var(--duration) var(--ease);
}

.articles-table tbody tr:hover {
  background: var(--clr-green-50);
}

.table-row-anim {
  opacity: 0;
  animation: rowFadeIn 0.4s forwards;
}

.table-row-delay-1 {
  animation-delay: 0ms;
}

.table-row-delay-2 {
  animation-delay: 60ms;
}

.table-row-delay-3 {
  animation-delay: 120ms;
}

.table-row-delay-4 {
  animation-delay: 180ms;
}

.table-row-delay-5 {
  animation-delay: 240ms;
}

.table-row-delay-6 {
  animation-delay: 300ms;
}

.table-row-delay-7 {
  animation-delay: 360ms;
}

.table-row-delay-8 {
  animation-delay: 420ms;
}

@keyframes rowFadeIn {
  to {
    opacity: 1;
  }
}

.article-cell {
  display: flex;
  align-items: center;
  gap: 9px;
}

.article-icon {
  width: 30px;
  height: 30px;
  background: var(--clr-green-50);
  color: var(--clr-green-600);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.article-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.article-name {
  font-weight: 600;
  color: var(--clr-text-900);
  font-size: 0.82rem;
  text-decoration: none;
  transition: color var(--duration) var(--ease);
}

.article-name:hover {
  color: var(--clr-green-600);
  text-decoration: underline;
}

.article-paid-tag {
  font-size: 0.62rem;
  font-weight: 700;
  background: #fff8e6;
  color: var(--clr-amber);
  border-radius: 4px;
  padding: 1px 5px;
  align-self: flex-start;
  border: 1px solid #ffe0a0;
}

.unassigned {
  color: var(--clr-text-300);
  font-style: italic;
  font-size: 0.78rem;
}

.date-cell {
  white-space: nowrap;
  font-size: 0.78rem;
}

.status-badge {
  font-size: 0.68rem;
  font-weight: 700;
  border-radius: 20px;
  padding: 3px 9px;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  text-transform: capitalize;
}

.status-badge--draft {
  background: #f0f0f0;
  color: #555;
}

.status-badge--review {
  background: #e8f4ff;
  color: #1d4ed8;
}

.status-badge--fact_check {
  background: #fef9c3;
  color: #854d0e;
}

.status-badge--legal {
  background: #ede9fe;
  color: #5b21b6;
}

.status-badge--approved {
  background: #d1fae5;
  color: #065f46;
}

.status-badge--scheduled {
  background: #e0f2fe;
  color: #0369a1;
}

.status-badge--published {
  background: #dbeafe;
  color: #1e3a8a;
}

.status-badge--archived {
  background: #e8e8f4;
  color: #44448a;
}

.status-badge--rejected {
  background: #fee2e2;
  color: #991b1b;
}

.status-badge--pending {
  background: #fff3db;
  color: #8a6500;
}

.status-badge--verified {
  background: #d1fae5;
  color: #065f46;
}

.status-badge--issues_found {
  background: #fee2e2;
  color: #991b1b;
}

.empty-table {
  text-align: center;
  padding: 28px 0;
  color: var(--clr-text-300);
  font-size: 0.83rem;
}

.empty-table a {
  color: var(--clr-green-600);
  text-decoration: none;
}

.empty-table a:hover {
  text-decoration: underline;
}

.chart-legend {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
  color: var(--clr-text-300);
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.legend-dot--pub {
  background: var(--clr-green-800);
}

.legend-dot--draft {
  background: var(--clr-green-200);
}

.legend-text {
  margin-right: 6px;
}

.chart-value-hero {
  margin-bottom: 10px;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.chart-hero-num {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--clr-text-900);
  letter-spacing: -0.02em;
}

.chart-hero-trend {
  font-size: 0.78rem;
  color: var(--clr-green-600);
}

.chart-wrap {
  position: relative;
  height: 130px;
}

/* ─────────────────────────────────────────────
   ROW 3 — CATEGORIES + DONUT + FACT CHECKS
───────────────────────────────────────────── */
.dash-bottom-row {
  display: grid;
  grid-template-columns: 1fr 220px 280px;
  gap: 16px;
  margin-bottom: 20px;
}

.category-bars {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cat-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cat-label {
  font-size: 0.77rem;
  color: var(--clr-text-500);
  width: 90px;
  flex-shrink: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cat-bar-track {
  flex: 1;
  height: 8px;
  background: var(--clr-green-50);
  border-radius: 4px;
  overflow: hidden;
}

.cat-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.85s cubic-bezier(0.4, 0, 0.2, 1);
}

.cat-bar--high {
  background: var(--clr-green-800);
}

.cat-bar--mid {
  background: var(--clr-green-600);
}

.cat-bar--low {
  background: var(--clr-green-200);
}

.cat-count {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--clr-text-900);
  width: 28px;
  text-align: right;
  flex-shrink: 0;
}

.dash-card--donut {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px 16px;
}

.donut-wrap {
  position: relative;
  width: 140px;
  height: 140px;
  margin: 6px auto;
}

.donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  pointer-events: none;
}

.donut-count {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--clr-text-900);
  letter-spacing: -0.02em;
}

.donut-sub {
  font-size: 0.68rem;
  color: var(--clr-text-300);
}

.donut-legend {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 8px 0 6px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  color: var(--clr-text-500);
}

.ld {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.ld--pub {
  background: #1e3a8a;
}

.ld--draft {
  background: var(--clr-green-400);
}

.ld--review {
  background: var(--clr-amber);
}

.ld--archive {
  background: var(--clr-text-300);
}

.donut-tip {
  font-size: 0.7rem;
  color: var(--clr-text-300);
  text-align: center;
  line-height: 1.5;
  margin-bottom: 10px;
}

.guide-btn {
  display: block;
  width: 100%;
  text-align: center;
  background: var(--clr-card);
  border: 1.5px solid var(--clr-border);
  border-radius: var(--radius-sm);
  padding: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--clr-text-900);
  text-decoration: none;
  transition: background var(--duration) var(--ease),
    border-color var(--duration) var(--ease),
    color var(--duration) var(--ease);
}

.guide-btn:hover {
  background: var(--clr-green-50);
  border-color: var(--clr-green-200);
  color: var(--clr-green-800);
}

.dash-card--factcheck {
  display: flex;
  flex-direction: column;
}

.factcheck-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fc-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.fc-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.fc-dot--pending {
  background: var(--clr-amber);
}

.fc-dot--verified {
  background: var(--clr-green-400);
}

.fc-dot--issues {
  background: var(--clr-red);
}

.fc-label {
  flex: 1;
  font-size: 0.8rem;
  color: var(--clr-text-500);
}

.fc-val {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--clr-text-900);
}

.top-reporters {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.reporter-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.reporter-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--clr-green-50);
  color: var(--clr-green-800);
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  text-transform: uppercase;
}

.reporter-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.reporter-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--clr-text-900);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reporter-stats {
  font-size: 0.68rem;
  color: var(--clr-text-300);
}

.reporter-total {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--clr-green-800);
  flex-shrink: 0;
}

/* ─────────────────────────────────────────────
   ROW 4 — WORKFLOW LOGS
───────────────────────────────────────────── */
.dash-logs-row {
  margin-bottom: 20px;
}

.dash-card--logs {
  padding: 20px 24px;
}

.log-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.log-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--clr-border);
  transition: background var(--duration) var(--ease);
}

.log-row:last-child {
  border-bottom: none;
}

.log-row:hover {
  background: var(--clr-green-50);
  margin: 0 -12px;
  padding-left: 12px;
  padding-right: 12px;
  border-radius: 8px;
}

.log-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--clr-green-50);
  color: var(--clr-green-600);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.log-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.log-article {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--clr-text-900);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.log-transition {
  display: flex;
  align-items: center;
  gap: 6px;
}

.log-arrow {
  color: var(--clr-text-300);
  font-size: 0.8rem;
}

.log-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
}

.log-user {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--clr-text-900);
}

.log-time {
  font-size: 0.68rem;
  color: var(--clr-text-300);
}

/* ─────────────────────────────────────────────
   QUICK ACCESS GRID
───────────────────────────────────────────── */
.quick-access {
  margin-top: 4px;
}

.quick-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--clr-text-300);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}

.quick-item-wrapper {
  position: relative;
}

.quick-item {
  background: #ffffff00;
  border: 1px solid #e8ede936;
  border-radius: 12px;
  padding: 11px 14px;
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: #fff !important;
  font-size: 0.82rem;
  font-weight: 500;
  width: 100%;
  transition: border-color var(--ease), background var(--duration) var(--ease), transform var(--duration) var(--ease);
}

.quick-item:hover {
  border-color: var(--clr-green-200);
  background: var(--clr-green-50);
  transform: translateY(-1px);
}

.quick-icon {
  width: 26px;
  height: 26px;
  background: var(--clr-green-50);
  color: var(--clr-green-600);
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background var(--duration) var(--ease);
}

.quick-item:hover .quick-icon {
  background: var(--clr-green-200);
}

.quick-label {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: black;
}

.quick-add {
  position: absolute;
  top: 7px;
  right: 9px;
  width: 20px;
  height: 20px;
  background: var(--clr-green-800);
  color: #fff;
  border-radius: 50%;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
  text-decoration: none;
  opacity: 0;
  transition: opacity var(--duration) var(--ease);
}

.quick-item-wrapper:hover .quick-add {
  opacity: 1;
}

/* ─────────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────────── */
@media (max-width: 1280px) {
  .kpi-row {
    grid-template-columns: 240px 1fr 1fr;
  }

  .kpi-row .kpi-card:last-child {
    grid-column: 2 / 4;
  }
}

@media (max-width: 1100px) {
  .dash-mid-row {
    grid-template-columns: 1fr;
  }

  .dash-bottom-row {
    grid-template-columns: 1fr 1fr;
  }

  .dash-card--factcheck {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .kpi-row {
    grid-template-columns: 1fr 1fr;
  }

  .kpi-card--highlight {
    grid-column: 1 / -1;
  }

  .dash-bottom-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .kpi-row {
    grid-template-columns: 1fr;
  }

  .stat-pills {
    gap: 7px;
  }

  .stat-pill {
    padding: 5px 10px 5px 6px;
  }

  .articles-table th:nth-child(3),
  .articles-table th:nth-child(4),
  .articles-table td:nth-child(3),
  .articles-table td:nth-child(4) {
    display: none;
  }
}


.sidebar-user {
  margin-top: auto;
  height: 73px;
  padding: 14px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #3b82f6;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-avatar img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
}

.user-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: #0e0303;
}

.user-email {
  font-size: 0.7rem;
  color: rgb(55 50 50 / 70%);
}

/* ─────────────────────────────────────────────
   MAIN CONTENT AREA
───────────────────────────────────────────── */
.admin-main {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ─────────────────────────────────────────────
   TOPBAR
───────────────────────────────────────────── */
.admin-topbar {
  height: 63px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  border-bottom: 1px solid #eef2f5;
  margin-left: 2%;
}

.topbar-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: #1e3a8a;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.topbar-search {
  position: relative;
  background: #f5f7fa;
  border: 1px solid rgba(59, 130, 246, 0.16);
  border-radius: 30px;
  padding: 8px 16px 8px 40px;
  min-width: 404px;
}

.topbar-search input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 0.85rem;
  width: 100%;
  color: #1e3a8a !important;
  -webkit-text-fill-color: #1e3a8a !important;
}

.topbar-search input::placeholder {
  color: rgba(59, 130, 246, 0.5) !important;
}

.search-icon {
  position: absolute;
  color: #162c6b;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.5;
}

.topbar-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: #f5f7fa;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s ease;
}

.topbar-icon-btn:hover {
  background: #e5e7eb;
}

.topbar-add-btn {
  background: #162c6b;
  color: #ffffff;
  border-radius: 24px;
  padding: 8px 18px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: 0.25s ease;
}

.topbar-add-btn:hover {
  background: #0f1f3d;
}

/* ================================
   THEME COLOR OVERRIDE
================================ */

:root {
  --clr-primary: #162c6b !important;
  --clr-primary-dark: #0f1f3d !important;
  --clr-secondary: #1e3a8a !important;
  --clr-green-600: #162c6b !important;
  --clr-green-800: #1e3a8a !important;
  --clr-green-200: rgba(22, 44, 107, 0.15) !important;
  --clr-green-50: rgba(22, 44, 107, 0.05) !important;
}

.user-avatar {
  background: none !important;
  color: #ffffff !important;
  width: 50px !important;
  height: 50px !important;
}

.admin-topbar {
  background: rgb(255 255 255 / 97%) !important;
  color: #1e3a8a !important;
  margin-left: 47px !important;
}

.topbar-search input {
  color: #1e3a8a !important;
}

.topbar-title {
  color: #1e3a8a !important;
}

.topbar-search input::placeholder {
  color: rgba(59, 130, 246, 0.5) !important;
}

.quick-add,
button,
.btn-primary {
  background: #162c6b !important;
  color: #ffffff !important;
  border-color: #162c6b !important;
}

.topbar-add-btn,
.topbar-icon-btn {
  background: #162c6b !important;
  color: #ffffff !important;
}

.topbar-add-btn:hover,
.quick-add:hover,
button:hover,
.btn-primary:hover {
  background: #0f1f3d !important;
  color: #ffffff !important;
}

.article-name {
  color: #162c6b !important;
}

a,
.dash-card-link,
{
color: #ffffffb5 !important;
font-size: 16px;
text-decoration: none;
}

.field-__str__ {
  text-align: left;
  font-weight: 400;
}

.field-__str__ a:hover {
  background: none !important;
  color: #162c6b !important;
}

.addlink {
  font-weight: 700;
  background-color: #162c6b;
  color: white !important;
  padding: 10px;
  border-radius: 12px;
}

.object-tools li {
  list-style: none;
}

.addlink a:hover {
  background-color: #1d4ed8 !important;
  color: white !important;
}

.text a:hover {
  color: #1d4ed8 !important;
}

.articles-table tbody tr:hover,
.log-row:hover,
.quick-item:hover {
  background: rgba(22, 44, 107, 0.05) !important;
}

.cat-bar--high {
  background: #1e3a8a !important;
}

.cat-bar--mid {
  background: #162c6b !important;
  color: white !important;
}

.cat-bar--low {
  background: rgba(22, 44, 107, 0.4) !important;
}

.status-badge--published {
  background: rgba(59, 130, 246, 0.1) !important;
  color: #1e3a8a !important;
}

.status-badge--rejected {
  background: rgba(22, 44, 107, 0.1) !important;
  color: #162c6b !important;
}

.status-badge--issues_found {
  background: rgba(22, 44, 107, 0.1) !important;
  color: #162c6b !important;
}

.dash-card--homepage {
  margin-top: 25px;
}

.homepage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.homepage-slot {
  background: #f9fbfa;
  border-radius: 12px;
  padding: 14px;
  border: 1px solid #eef2ef;
  transition: 0.2s ease;
}

.homepage-slot:hover {
  transform: translateY(-3px);
}

.slot-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.slot-name {
  font-weight: 600;
}

.slot-mode {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 20px;
  font-weight: 600;
}

.slot-mode--manual {
  background: #ffe8d6;
  color: #b24d00;
}

.slot-mode--auto {
  background: #e1f5ec;
  color: #0b5d3b;
}

.slot-body {
  font-size: 13px;
  color: #555;
  margin-bottom: 10px;
}

.slot-edit-btn {
  font-size: 12px;
  text-decoration: none;
  color: #1e3a8a;
  font-weight: 600;
}



/* ── REPORTER PERFORMANCE ── */
.tp-card {
  background: #fff;
  border: 1.5px solid #162c6b;
  border-radius: 16px;
  padding: 28px;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(22, 44, 107, 0.15);
}

.tp-card__glow {
  position: absolute;
  top: -40px;
  right: -40px;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(22, 44, 107, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.tp-card__label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #162c6b;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.tp-card__label svg {
  color: #162c6b;
  flex-shrink: 0;
}

.tp-card__body {
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}

.tp-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #162c6b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 0 0 4px rgba(22, 44, 107, 0.15);
}

.tp-info {
  flex: 1;
}

.tp-info__name {
  color: #0f172a;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 14px;
}

.tp-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

.tp-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tp-stat__label {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #999;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

.tp-stat__label svg {
  color: #162c6b;
  opacity: 0.7;
}

.tp-stat__value {
  color: #0f172a;
  font-size: 20px;
  font-weight: 700;
}

.tp-stat__value--accent {
  color: #162c6b;
}

.tp-score {
  text-align: center;
  background: rgba(22, 44, 107, 0.05);
  border: 1.5px solid rgba(22, 44, 107, 0.15);
  border-radius: 14px;
  padding: 18px 28px;
}

.tp-score__number {
  font-size: 52px;
  font-weight: 800;
  color: #162c6b;
  line-height: 1;
}

.tp-score__sub {
  color: #aaa;
  font-size: 11px;
  margin-top: 4px;
  font-weight: 500;
}

/* ── RANKINGS TABLE ── */
.rank-wrap {
  background: #fff;
  border: 1.5px solid #eee;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 28px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.rank-header {
  padding: 16px 22px;
  border-bottom: 1.5px solid #f0f0f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fafafa;
}

.rank-header__title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #0f172a;
  font-weight: 700;
  font-size: 15px;
}

.rank-header__title svg {
  color: #162c6b;
}

.rank-header__month {
  color: #aaa;
  font-size: 13px;
}

.rank-scroll {
  overflow-x: auto;
}

.rank-table {
  width: 100%;
  border-collapse: collapse;
}

.rank-table thead tr {
  background: #162c6b;
}

.rank-table th {
  padding: 12px 14px;
  text-align: left;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.rank-table tbody tr {
  border-top: 1px solid #f4f4f4;
  transition: background 0.15s;
}

.rank-table tbody tr:hover {
  background: rgba(22, 44, 107, 0.04);
}

.rank-table td {
  padding: 13px 14px;
  font-size: 14px;
  color: #555;
}

.rank-table td.td--rank {
  color: #bbb;
}

.rank-table td.td--name {
  color: #0f172a;
  font-weight: 500;
}

.rank-table td.td--pub {
  color: #162c6b;
  font-weight: 600;
}

.rank-table td.td--rej {
  color: #D80100;
}

.medal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
}

.medal--gold {
  background: #c9940a;
}

.medal--silver {
  background: #8a8a8a;
}

.medal--bronze {
  background: #a05c2c;
}

.rank-num {
  color: #ccc;
  font-size: 13px;
  font-weight: 600;
}

.reporter-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.reporter-cell__avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #162c6b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.badge {
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
}

.badge--danger {
  background: rgba(216, 1, 0, 0.1);
  color: #D80100;
}

.badge--success {
  background: rgba(21, 128, 61, 0.1);
  color: #15803d;
}

.txt--danger {
  color: #D80100;
}

.txt--muted {
  color: #aaa;
}

.score-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.score-bar__track {
  width: 60px;
  height: 6px;
  background: #f0f0f0;
  border-radius: 3px;
  overflow: hidden;
}

.score-bar__fill {
  height: 100%;
  border-radius: 3px;
}

.score-bar__fill--high {
  background: #162c6b;
}

.score-bar__fill--medium {
  background: #d97706;
}

.score-bar__fill--low {
  background: #D80100;
}

.score-val--high {
  color: #162c6b;
  font-weight: 700;
  font-size: 14px;
}

.score-val--medium {
  color: #d97706;
  font-weight: 700;
  font-size: 14px;
}

.score-val--low {
  color: #D80100;
  font-weight: 700;
  font-size: 14px;
}

/* ── REPORTER TABLE ── */
.rt-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  background: #fff;
  border: 1.5px solid #162c6b;
  border-radius: 14px;
  padding: 20px 24px;
  margin-bottom: 24px;
  box-shadow: 0 3px 16px rgba(22, 44, 107, 0.15);
}

.rt-header__left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.rt-header__icon {
  width: 44px;
  height: 44px;
  background: #162c6b;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}

.rt-header__title {
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
}

.rt-header__sub {
  font-size: 12px;
  color: #aaa;
  margin-top: 2px;
}

.rt-header__stats {
  display: flex;
  gap: 20px;
}

.rt-hstat {
  text-align: center;
  padding: 10px 18px;
  background: #fafafa;
  border: 1px solid #eee;
  border-radius: 10px;
}

.rt-hstat--red {
  border-color: rgba(22, 44, 107, 0.2);
  background: rgba(22, 44, 107, 0.03);
}

.rt-hstat--green {
  border-color: rgba(21, 128, 61, 0.2);
  background: rgba(21, 128, 61, 0.03);
}

.rt-hstat__val {
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1;
}

.rt-hstat--red .rt-hstat__val {
  color: #162c6b;
}

.rt-hstat--green .rt-hstat__val {
  color: #15803d;
}

.rt-hstat__label {
  font-size: 10px;
  color: #aaa;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 4px;
}

.rt-tabs {
  display: flex;
  gap: 4px;
  padding: 14px 18px 0;
  border-bottom: 1.5px solid #f0f0f0;
  background: #1e3a8a;
}

.rt-tab {
  padding: 8px 16px;
  border: none;
  background: #fff !important;
  font-size: 13px;
  font-weight: 600;
  color: #999 !important;
  cursor: pointer;
  border-bottom: 2.5px solid transparent;
  margin-bottom: -1.5px;
  transition: all 0.18s;
  border-radius: 6px 6px 0 0;
}

.rt-tab:hover {
  color: #162c6b;
}

.rt-tab--active {
  color: #162c6b;
  border-bottom-color: #162c6b;
  background: #fff;
}

.rt-wrap {
  background: #fff;
  border: 1.5px solid #eee;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 28px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.rt-scroll {
  overflow-x: auto;
}

.rt-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
}

.rt-table thead tr {
  background: rgba(22, 44, 107, 0.1);
}

.rt-table th {
  padding: 13px 16px;
  text-align: left;
  color: #1e3a8a;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  white-space: nowrap;
}

.rt-table th svg {
  display: inline;
  vertical-align: middle;
  margin-right: 5px;
  opacity: 0.8;
}

.th-reporter {
  width: 180px;
}

.th-stories {
  width: 240px;
}

.th-draft {
  width: 200px;
}

.th-comments {
  width: 220px;
}

.th-plagiarism {
  width: 150px;
}

.rt-row {
  border-top: 1px solid #f4f4f4;
  transition: background 0.15s;
  vertical-align: top;
}

.rt-row:hover {
  background: rgba(22, 44, 107, 0.03);
}

.rt-table td {
  padding: 14px 16px;
  font-size: 13px;
  color: #555;
  vertical-align: top;
}

.rep-cell {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.rep-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.rep-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.rep-name {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}

.rep-designation {
  font-size: 11px;
  color: #999;
}

.rep-type {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  align-self: flex-start;
  margin-top: 2px;
}

.rep-type--full_time {
  background: rgba(21, 128, 61, 0.1);
  color: #15803d;
}

.rep-type--part_time {
  background: rgba(217, 119, 6, 0.1);
  color: #d97706;
}

.rep-type--freelancer {
  background: rgba(22, 44, 107, 0.1);
  color: #162c6b;
}

.story-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.story-item {
  background: #fafafa;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 8px 10px;
  transition: border-color 0.15s;
}

.story-item--overdue {
  border-color: rgba(216, 1, 0, 0.3);
  background: rgba(216, 1, 0, 0.02);
}

.story-item__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 6px;
  margin-bottom: 5px;
}

.story-title {
  font-size: 12px;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.3;
}

.story-status {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}

.status--draft {
  background: #f0f0f0;
  color: #555;
}

.status--review {
  background: #e8f4ff;
  color: #1d4ed8;
}

.status--fact_check {
  background: #fef9c3;
  color: #854d0e;
}

.status--legal {
  background: #ede9fe;
  color: #5b21b6;
}

.status--approved {
  background: #d1fae5;
  color: #065f46;
}

.status--published {
  background: rgba(59, 130, 246, 0.1);
  color: #1e3a8a;
}

.status--rejected {
  background: rgba(216, 1, 0, 0.1);
  color: #D80100;
}

.story-item__bottom {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
}

.story-item__bottom svg {
  color: #aaa;
  flex-shrink: 0;
}

.deadline--ok {
  color: #15803d;
}

.deadline--overdue {
  color: #D80100;
  font-weight: 600;
}

.deadline--none {
  color: #ccc;
  font-style: italic;
}

.overdue-tag {
  font-size: 9px;
  font-weight: 800;
  background: #D80100;
  color: #fff;
  padding: 1px 5px;
  border-radius: 4px;
  letter-spacing: 0.05em;
}

.story-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  font-size: 11px;
  color: #aaa;
}

.overdue-pill {
  background: rgba(216, 1, 0, 0.1);
  color: #D80100;
  padding: 1px 7px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 10px;
}

.draft-card {
  background: #fafafa;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 8px;
}

.draft-card__title {
  font-size: 12px;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 6px;
  line-height: 1.3;
}

.draft-card__meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
}

.draft-meta-row {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: #888;
}

.draft-meta-row svg {
  flex-shrink: 0;
}

.draft-meta-row--green {
  color: #15803d;
}

.draft-meta-row--warn {
  color: #d97706;
}

.draft-edit-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  color: #162c6b;
  text-decoration: none;
  border: 1px solid rgba(22, 44, 107, 0.3);
  padding: 4px 10px;
  border-radius: 6px;
  transition: all 0.15s;
}

.draft-edit-btn:hover {
  background: #162c6b;
  color: #fff;
}

.rev-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rev-item {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.rev-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 4px;
}

.rev-dot--published {
  background: #15803d;
}

.rev-dot--rejected {
  background: #D80100;
}

.rev-dot--review {
  background: #1d4ed8;
}

.rev-dot--fact_check {
  background: #d97706;
}

.rev-dot--draft {
  background: #aaa;
}

.rev-dot--approved {
  background: #065f46;
}

.rev-dot--legal {
  background: #5b21b6;
}

.rev-body {
  flex: 1;
  min-width: 0;
}

.rev-title {
  font-size: 12px;
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rev-transition {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 3px 0;
}

.rev-status {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
}

.rev-status--old {
  background: #f0f0f0;
  color: #888;
}

.rev-status--new {
  background: rgba(22, 44, 107, 0.1);
  color: #162c6b;
}

.rev-transition svg {
  color: #ccc;
  flex-shrink: 0;
}

.rev-remark {
  font-size: 11px;
  color: #888;
  font-style: italic;
  margin: 3px 0;
  line-height: 1.4;
}

.rev-time {
  font-size: 10px;
  color: #bbb;
}

.rev-count {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 8px;
  font-size: 11px;
  color: #aaa;
}

.rev-count svg {
  color: #162c6b;
}

.plag-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.plag-score {
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
}

.plag--high .plag-score,
.plag--high {
  color: #D80100;
}

.plag--medium .plag-score,
.plag--medium {
  color: #d97706;
}

.plag--low .plag-score,
.plag--low {
  color: #15803d;
}

.plag-bar-track {
  width: 100%;
  height: 6px;
  background: #f0f0f0;
  border-radius: 3px;
  overflow: hidden;
}

.plag-bar-fill {
  height: 100%;
  border-radius: 3px;
}

.plag-fill--high {
  background: #D80100;
}

.plag-fill--medium {
  background: #d97706;
}

.plag-fill--low {
  background: #15803d;
}

.plag-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
}

.plag-label--high {
  color: #D80100;
}

.plag-label--medium {
  color: #d97706;
}

.plag-label--low {
  color: #15803d;
}

.plag-articles {
  font-size: 10px;
  color: #bbb;
}

.empty-cell {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #ccc;
  font-size: 12px;
  font-style: italic;
  padding: 4px 0;
}

.empty-cell svg {
  color: #ddd;
  flex-shrink: 0;
}

/* ── FACT CHECK & LEGAL ── */
.fc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  background: #fff;
  border: 1.5px solid #162c6b;
  border-radius: 14px;
  padding: 20px 24px;
  margin-bottom: 24px;
  box-shadow: 0 3px 16px rgba(22, 44, 107, 0.07);
}

.fc-header__left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.fc-header__icon {
  width: 44px;
  height: 44px;
  background: #162c6b;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}

.fc-header__title {
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
}

.fc-header__sub {
  font-size: 12px;
  color: #aaa;
  margin-top: 2px;
}

.fc-header__stats {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.fc-hstat {
  text-align: center;
  padding: 10px 18px;
  background: #fafafa;
  border: 1px solid #eee;
  border-radius: 10px;
}

.fc-hstat--warn {
  border-color: rgba(217, 119, 6, 0.25);
  background: rgba(217, 119, 6, 0.04);
}

.fc-hstat--green {
  border-color: rgba(21, 128, 61, 0.25);
  background: rgba(21, 128, 61, 0.04);
}

.fc-hstat--red {
  border-color: rgba(22, 44, 107, 0.25);
  background: rgba(22, 44, 107, 0.04);
}

.fc-hstat--purple {
  border-color: rgba(91, 33, 182, 0.25);
  background: rgba(91, 33, 182, 0.04);
}

.fc-hstat__val {
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1;
}

.fc-hstat--warn .fc-hstat__val {
  color: #d97706;
}

.fc-hstat--green .fc-hstat__val {
  color: #15803d;
}

.fc-hstat--red .fc-hstat__val {
  color: #162c6b;
}

.fc-hstat--purple .fc-hstat__val {
  color: #5b21b6;
}

.fc-hstat__label {
  font-size: 10px;
  color: #aaa;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 4px;
}

.fc-wrap {
  background: #fff;
  border: 1.5px solid #eee;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 28px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.fc-tabs {
  display: flex;
  gap: 4px;
  padding: 14px 18px 0;
  border-bottom: 1.5px solid #f0f0f0;
  background: #1e3a8a;
}

.fc-tab {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 14px;
  border: none;
  background: #fff !important;
  font-size: 12px;
  font-weight: 600;
  color: #999 !important;
  cursor: pointer;
  border-bottom: 2.5px solid transparent;
  margin-bottom: -1.5px;
  transition: all 0.18s;
  border-radius: 6px 6px 0 0;
}

.fc-tab:hover {
  color: #162c6b;
}

.fc-tab--active {
  color: #162c6b;
  border-bottom-color: #162c6b;
  background: #fff;
}

.fc-tab svg {
  flex-shrink: 0;
}

.fc-scroll {
  overflow-x: auto;
}

.fc-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 960px;
}

.fc-table thead tr {
  background: rgba(22, 44, 107, 0.1);
}

.fc-table th {
  padding: 13px 16px;
  text-align: left;
  color: #1e3a8a;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  white-space: nowrap;
}

.fc-table th svg {
  display: inline;
  vertical-align: middle;
  margin-right: 5px;
  opacity: 0.8;
}

.fc-row {
  border-top: 1px solid #f4f4f4;
  transition: background 0.15s;
  vertical-align: top;
}

.fc-row:hover {
  background: rgba(22, 44, 107, 0.025);
}

.fc-table td {
  padding: 14px 16px;
  font-size: 13px;
  color: #555;
  vertical-align: top;
}

.fc-article-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.fc-article__cat {
  font-size: 10px;
  font-weight: 700;
  color: #162c6b;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.fc-article__title {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  text-decoration: none;
  line-height: 1.4;
}

.fc-article__title:hover {
  color: #162c6b !important;
  text-decoration: underline;
}

.fc-article__meta {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: #aaa;
  margin-top: 2px;
}

.fc-article__meta svg {
  flex-shrink: 0;
}

.fc-dot-sep {
  opacity: 0.4;
}

.fc-article-status {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  align-self: flex-start;
  margin-top: 2px;
}

.fc-status-cell {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fc-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  align-self: flex-start;
}

.fc-badge--pending {
  background: rgba(217, 119, 6, 0.1);
  color: #d97706;
}

.fc-badge--verified {
  background: rgba(22, 44, 107, 0.1);
  color: #162c6b;
}

.fc-badge--issues_found {
  background: rgba(216, 1, 0, 0.1);
  color: #D80100;
}

.fc-checker {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #aaa;
}

.fc-checker svg {
  flex-shrink: 0;
}

.checklist {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 6px;
}

.checklist-item svg {
  flex-shrink: 0;
}

.checklist-item--done {
  background: rgba(21, 128, 61, 0.07);
  color: #15803d;
}

.checklist-item--fail {
  background: rgba(216, 1, 0, 0.07);
  color: #D80100;
}

.checklist-item--pending {
  background: #f5f5f5;
  color: #aaa;
}

.legal-cell {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.legal-flag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  align-self: flex-start;
}

.legal-flag--risk {
  background: rgba(91, 33, 182, 0.1);
  color: #5b21b6;
}

.legal-flag--clear {
  background: rgba(21, 128, 61, 0.1);
  color: #15803d;
}

.legal-items {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.legal-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  padding: 2px 0;
}

.legal-item svg {
  flex-shrink: 0;
}

.legal-item--alert {
  color: #D80100;
}

.legal-item--ok {
  color: #15803d;
}

.legal-disclaimer {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: #5b21b6;
  margin-top: 2px;
}

.legal-disclaimer svg {
  flex-shrink: 0;
}

.fc-remark {
  font-size: 12px;
  color: #666;
  font-style: italic;
  line-height: 1.5;
}

.fc-time {
  font-size: 12px;
  font-weight: 600;
  color: #0f172a;
}

.fc-timesince {
  font-size: 11px;
  color: #bbb;
  margin-top: 2px;
}

.fc-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fc-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.15s;
}

.fc-btn--edit {
  color: #162c6b;
  border: 1px solid rgba(22, 44, 107, 0.3);
  background: #fff;
}

.fc-btn--edit:hover {
  background: #162c6b;
  color: #fff !important;
}

.fc-btn--view {
  color: #555;
  border: 1px solid #eee;
  background: #fafafa;
}

.fc-btn--view:hover {
  background: #f0f0f0;
  color: #0f172a !important;
}

.fc-empty {
  text-align: center;
  padding: 48px 0;
  color: #ccc;
  font-size: 14px;
}

.fc-empty svg {
  display: block;
  margin: 0 auto 10px;
  color: #eee;
}

.fc-empty a {
  color: #162c6b;
  text-decoration: none;
  font-weight: 600;
  margin-top: 8px;
  display: block;
}

.fc-table {
  display: table !important;
}

.fc-table thead {
  display: table-header-group !important;
}

.fc-table tbody {
  display: table-row-group !important;
}

.fc-table tr {
  display: table-row !important;
}

.fc-table th,
.fc-table td {
  display: table-cell !important;
}

/* ── ARTICLE PAGE ── */
.art-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  background: #fff;
  border: 1.5px solid #162c6b;
  border-radius: 14px;
  padding: 20px 24px;
  margin-bottom: 20px;
  box-shadow: 0 3px 16px rgba(22, 44, 107, 0.07);
}

.art-page-header__left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.art-page-header__icon {
  width: 48px;
  height: 48px;
  background: #162c6b;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}

.art-page-header__title {
  font-size: 18px;
  font-weight: 600;
  color: #0f172a;
}

.art-page-header__sub {
  font-size: 12px;
  color: #aaa;
  margin-top: 3px;
}

.art-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #162c6b;
  color: #fff !important;
  font-size: 14px;
  font-weight: 700;
  padding: 12px 22px;
  border-radius: 10px;
  text-decoration: none !important;
  box-shadow: 0 4px 14px rgba(22, 44, 107, 0.3);
  transition: all 0.18s;
}

.art-add-btn:hover {
  background: #0f1f3d;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(22, 44, 107, 0.35);
}

.art-filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.art-filter {
  padding: 6px 16px;
  border: 1.5px solid #eee;
  background: #fff !important;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: #162c6b !important;
  cursor: pointer;
  transition: all 0.15s;
}

.art-filter:hover {
  border-color: #162c6b;
  color: #162c6b;
}

.art-filter--active {
  background: #162c6b !important;
  border-color: #162c6b !important;
  color: #fff !important;
}

.art-table-wrap {
  background: #fff;
  border: 1.5px solid #eee;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 24px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.art-scroll {
  overflow-x: auto;
}

.art-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
}

.art-table thead tr {
  background: #162c6b78;
}

.art-table th {
  padding: 12px 16px;
  text-align: left;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.art-row {
  border-top: 1px solid #f4f4f4;
  transition: background 0.15s;
}

.art-row:hover {
  background: rgba(22, 44, 107, 0.025);
}

.art-table td {
  padding: 12px 16px;
  font-size: 13px;
  color: #555;
  vertical-align: middle;
}

.art-title-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.art-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.art-thumb--placeholder {
  background: #f5f5f5;
  border: 1px solid #eee;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ccc;
}

.art-title-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.art-title {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  text-decoration: none;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 240px;
  display: block;
}

.art-title:hover {
  color: #162c6b !important;
}

.art-excerpt {
  font-size: 11px;
  color: #bbb;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 240px;
}

.art-cat {
  font-size: 11px;
  font-weight: 700;
  color: #162c6b;
  background: rgba(22, 44, 107, 0.07);
  padding: 3px 8px;
  border-radius: 20px;
}

.art-author {
  display: flex;
  align-items: center;
  gap: 6px;
}

.art-author__avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #162c6b;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.art-author__avatar--blue {
  background: #1d4ed8;
}

.art-author span {
  font-size: 12px;
  color: #555;
}

.art-unassigned {
  font-size: 11px;
  color: #ccc;
  font-style: italic;
}

.art-status {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  white-space: nowrap;
}

.art-date {
  font-size: 12px;
  font-weight: 600;
  color: #333;
}

.art-timesince {
  font-size: 10px;
  color: #bbb;
  margin-top: 1px;
}

.art-paid {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
}

.art-paid--yes {
  background: rgba(21, 128, 61, 0.1);
  color: #15803d;
}

.art-paid--no {
  background: #f5f5f5;
  color: #aaa;
}

.art-actions {
  display: flex;
  gap: 4px;
}

.art-action-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.15s;
}

.art-action-btn--edit {
  color: #162c6b;
  border: 1px solid rgba(22, 44, 107, 0.2);
}

.art-action-btn--edit:hover {
  background: #162c6b;
  color: #fff !important;
}

.art-empty {
  text-align: center;
  padding: 48px 0;
  color: #ccc;
  font-size: 14px;
}

.art-empty svg {
  display: block;
  margin: 0 auto 10px;
  color: #eee;
}

.art-empty a {
  color: #162c6b;
  text-decoration: none;
  font-weight: 600;
  margin-top: 8px;
  display: block;
}

.art-bottom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 28px;
}

@media (max-width: 900px) {
  .art-bottom-grid {
    grid-template-columns: 1fr;
  }
}

.art-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid #f0f0f0;
}

.art-section-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}

.art-section-title svg {
  color: #162c6b;
  flex-shrink: 0;
}

.art-section-count {
  font-size: 11px;
  color: #aaa;
}

.art-section-viewall {
  font-size: 11px;
  font-weight: 700;
  color: #162c6b;
  text-decoration: none;
}

.art-section-viewall:hover {
  text-decoration: underline;
}

.art-images-section {
  background: #fff;
  border: 1.5px solid #eee;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.art-images-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 14px;
}

.art-img-card {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 4/3;
  cursor: pointer;
}

.art-img-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}

.art-img-card:hover .art-img-card__img {
  transform: scale(1.05);
}

.art-img-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, transparent 50%);
  padding: 10px 8px 8px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  opacity: 0;
  transition: opacity 0.2s;
}

.art-img-card:hover .art-img-card__overlay {
  opacity: 1;
}

.art-img-card__title {
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 5px;
}

.art-img-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.art-img-card__link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  background: #162c6b;
  color: #fff !important;
  padding: 3px 8px;
  border-radius: 4px;
  text-decoration: none;
  align-self: flex-start;
}

.art-images-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 32px 0;
  color: #ccc;
  font-size: 13px;
}

.art-images-empty svg {
  display: block;
  margin: 0 auto 8px;
}

.art-activity-section {
  background: #fff;
  border: 1.5px solid #eee;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.art-activity-list {
  padding: 8px 0;
  max-height: 420px;
  overflow-y: auto;
}

.act-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 18px;
  border-bottom: 1px solid #f8f8f8;
  transition: background 0.15s;
}

.act-item:hover {
  background: rgba(22, 44, 107, 0.02);
}

.act-item:last-child {
  border-bottom: none;
}

.act-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #162c6b;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.act-body {
  flex: 1;
  min-width: 0;
}

.act-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 3px;
}

.act-user {
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
}

.act-time {
  font-size: 10px;
  color: #bbb;
}

.act-article {
  font-size: 12px;
  color: #666;
  display: block;
  margin-bottom: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.act-transition {
  display: flex;
  align-items: center;
  gap: 5px;
}

.act-transition svg {
  color: #ccc;
  flex-shrink: 0;
}

.act-status {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
}

.act-status--old {
  background: #f0f0f0;
  color: #888;
}

.act-status--new {
  background: rgba(22, 44, 107, 0.1);
  color: #162c6b;
}

.act-remark {
  font-size: 11px;
  color: #999;
  font-style: italic;
  margin-top: 4px;
}

.art-activity-empty {
  text-align: center;
  padding: 32px 0;
  color: #ccc;
  font-size: 13px;
}

.art-activity-empty svg {
  display: block;
  margin: 0 auto 8px;
}

.sidebar-post-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #162c6b;
  color: #fff !important;
  font-size: 13px;
  font-weight: 700;
  padding: 12px 16px;
  border-radius: 10px;
  text-decoration: none !important;
  margin: 12px 12px 4px;
  box-shadow: 0 3px 10px rgba(22, 44, 107, 0.3);
  transition: all 0.18s;
}

.sidebar-post-btn:hover {
  background: #0f1f3d;
  transform: translateY(-1px);
}

.sidebar-post-btn svg {
  flex-shrink: 0;
}

.post-article-btn svg {
  width: 1.4em;
  height: 1.6em;
  color: #fff !important;
}

.post-article-btn {
  width: 265px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #ffffff00 !important;
  color: #fff !important;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 7px;
  border: 1px solid #ffffff33;
  text-decoration: none;
  margin: 14px 12px 6px;
}

.post-article-btn:hover {
  background: #1d4ed8;
}

/* ══════════════════════════════════════════════════════════════
   ARTICLE EDITOR — ENHANCED TOOLBAR + PLAGIARISM MODAL
   (Integrated from toolbar component — nb-* namespace)
══════════════════════════════════════════════════════════════ */

/* ── Toolbar container ── */
.nb-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  background: #ffffff;
  border: 1.5px solid #e3eaf6;
  border-bottom: none;
  border-radius: 12px 12px 0 0;
  padding: 8px 10px;
  align-items: center;
  box-shadow: 0 2px 12px rgba(59, 130, 246, 0.08);
  row-gap: 5px;
}

/* ── Toolbar buttons ── */
.nb-toolbar button {
  background: none;
  border: 1px solid transparent;
  color: #6b7280;
  cursor: pointer;
  padding: 5px 8px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  line-height: 1;
  min-width: 28px;
  text-align: center;
}

.nb-toolbar button:hover {
  background: rgba(22, 44, 107, 0.08);
  color: #162c6b;
  border-color: rgba(22, 44, 107, 0.2);
}

.nb-toolbar button:active {
  background: rgba(22, 44, 107, 0.15);
}

/* ── Separator ── */
.nb-toolbar .sep {
  width: 1px;
  height: 20px;
  background: #e3eaf6;
  margin: 0 3px;
  flex-shrink: 0;
}

/* ── Font size select ── */
.nb-toolbar select {
  padding: 4px 7px;
  border: 1.5px solid #e3eaf6;
  border-radius: 7px;
  background: #fff;
  font-size: 12px;
  color: #374151;
  cursor: pointer;
  outline: none;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

#nb_plagBtn{
  color: #fff !important;
}

.nb-toolbar select:hover {
  border-color: #162c6b;
}

.nb-toolbar select:focus {
  border-color: #162c6b;
  box-shadow: 0 0 0 2px rgba(22, 44, 107, 0.12);
}

/* ── Color picker ── */
.color-btn-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.color-btn-wrap input[type="color"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
  border: none;
  padding: 0;
}

.color-btn-wrap button {
  pointer-events: none;
}

.color-swatch {
  display: block;
  width: 14px;
  height: 3px;
  border-radius: 2px;
  background: #000;
  margin: 2px auto 0;
  pointer-events: none;
}

/* ── AI Spell Fix ── */
.ai-spell-btn {
  display: flex !important;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #3b82f6, #1a56db) !important;
  border: none !important;
  color: #ffffff !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.05em;
  padding: 6px 13px !important;
  border-radius: 20px !important;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 10px rgba(59, 130, 246, 0.3);
  margin-left: 2px;
}

.ai-spell-btn:hover {
  opacity: 0.9 !important;
  box-shadow: 0 4px 18px rgba(59, 130, 246, 0.4) !important;
  transform: translateY(-1px);
  background: linear-gradient(135deg, #3b82f6, #1a56db) !important;
}

/* ── Plag Check ── */
.plag-btn {
    display: flex !important;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #1d4ed8, #162c6b) !important;
    color: #ffffff !important;
    border-radius: 20px !important;
    padding: 6px 13px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 0.05em;
    border: none !important;
    box-shadow: 0 2px 10px #1d4ed885;
    transition: opacity 0.2s, transform 0.2s, box-shadow 0.2s;
}

.plag-btn:hover {
  opacity: 0.9 !important;
  transform: translateY(-1px);
  box-shadow: 0 2px 10px #1d4ed885;
  background: linear-gradient(135deg, #1d4ed8, #162c6b) !important;
  color: #fff !important;
}

.plag-btn.loading {
  opacity: 0.65;
  pointer-events: none;
}

/* ── Pulsing dot (shared) ── */
.ai-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  animation: nbDotPulse 1.5s infinite;
  flex-shrink: 0;
}

@keyframes nbDotPulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.4;
    transform: scale(0.75);
  }
}

/* ── Content area rich text ── */
.nb-content-area h2 {
  font-size: 1.35em;
  font-weight: 700;
  margin: 10px 0 4px;
  color: #0f172a;
}

.nb-content-area h3 {
  font-size: 1.15em;
  font-weight: 600;
  margin: 8px 0 3px;
  color: #1f2937;
}

.nb-content-area blockquote {
  border-left: 4px solid #162c6b;
  margin: 8px 0;
  padding: 8px 14px;
  background: rgba(22, 44, 107, 0.05);
  color: #1e3a8a;
  border-radius: 0 8px 8px 0;
  font-style: italic;
}

.nb-content-area a {
  color: #162c6b;
  text-decoration: underline;
}

.nb-content-area hr {
  border: none;
  border-top: 2px solid #e3eaf6;
  margin: 12px 0;
}

/* ── Plagiarism Modal ── */
.plag-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
}

.plag-modal-overlay.show {
  display: flex;
}

.plag-modal {
  background: #fff;
  border-radius: 18px;
  padding: 28px;
  width: 440px;
  max-width: 96vw;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
  animation: pmSlideUp 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes pmSlideUp {
  from {
    transform: translateY(24px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.plag-modal__title {
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.plag-modal__sub {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 22px;
}

.pm-score-wrap {
  text-align: center;
  margin-bottom: 18px;
}

.pm-score-circle {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  margin: 0 auto 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 800;
  border: 6px solid;
  transition: all 0.5s;
}

.pm-score-circle.low {
  border-color: #22c55e;
  color: #15803d;
  background: #f0fdf4;
}

.pm-score-circle.medium {
  border-color: #f59e0b;
  color: #b45309;
  background: #fffbeb;
}

.pm-score-circle.high {
  border-color: #ef4444;
  color: #b91c1c;
  background: #fef2f2;
}

.pm-score-label {
  font-size: 13px;
  font-weight: 700;
  color: #374151;
}

.pm-bar-wrap {
  background: #f1f5f9;
  border-radius: 99px;
  height: 9px;
  margin-bottom: 16px;
  overflow: hidden;
}

.pm-bar {
  height: 100%;
  border-radius: 99px;
  transition: width 0.9s ease;
  width: 0%;
}

.pm-bar.low {
  background: linear-gradient(90deg, #4ade80, #22c55e);
}

.pm-bar.medium {
  background: linear-gradient(90deg, #fcd34d, #f59e0b);
}

.pm-bar.high {
  background: linear-gradient(90deg, #f87171, #ef4444);
}

.pm-analysis {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px;
  font-size: 13px;
  color: #374151;
  line-height: 1.65;
  max-height: 150px;
  overflow-y: auto;
  margin-bottom: 18px;
}

.pm-footer {
  display: flex;
  justify-content: flex-end;
}

.pm-close-btn {
  padding: 8px 20px;
  border-radius: 9px;
  border: 1.5px solid #e2e8f0;
  background: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  transition: background 0.15s;
  font-family: inherit;
}

.pm-close-btn:hover {
  background: #f1f5f9;
}

.pm-loading {
  text-align: center;
  padding: 24px 0;
  color: #64748b;
  font-size: 13px;
}

.pm-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #e2e8f0;
  border-top-color: #f59e0b;
  border-radius: 50%;
  animation: pmSpin 0.8s linear infinite;
  margin: 0 auto 12px;
}

@keyframes pmSpin {
  to {
    transform: rotate(360deg);
  }
}

/* ── LAYOUT ── */
.nb-editor-wrap {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 0;
  min-height: calc(100vh - 60px);
}

/* ── LEFT PANEL ── */
.nb-left {
  padding: 28px 32px;
  border-right: 1px solid var(--border);
  overflow-y: auto;
}

.nb-page-title {
  font-weight: 600;
  font-size: 22px;
  color: var(--text);
  margin: 0 0 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nb-page-title span {
  background: #162c6b !important;
  width: 3px;
  margin-left: 0px;
  /* font-family: 'Poppins'; */
  /* color: blue !important; */
  height: 28px;
  border-radius: 3px;
  display: inline-block;
}

/* Title & Subtitle */
.nb-field {
  margin-bottom: 18px;
}

.nb-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
  display: block;
}

.nb-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  padding: 10px 14px;
  outline: none;
  transition: border 0.2s;
}

.nb-input:focus {
  border-color: var(--red);
}

.nb-input.title-inp {
  font-size: 18px;
  font-weight: 600;
}

/* Toolbar */
.nb-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 10px 10px 0 0;
  padding: 8px 10px;
  align-items: center;
}

.nb-toolbar button {
    background: none;
    background-color: #f1f5f9 !important;
    border: none;
    color: #162c6b !important;
    cursor: pointer;
    padding: 5px 9px;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.15s;
    line-height: 1;
}

.nb-toolbar button:hover {
  background: var(--surface2);
  color: var(--text);
}

.nb-toolbar .sep {
  width: 1px;
  height: 18px;
  background: var(--border);
  margin: 0 4px;
}

/* AI Button */
.ai-spell-btn {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  border: 1px solid #4a4aff55 !important;
  color: #a0a8ff !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.05em;
  padding: 5px 12px !important;
  border-radius: 20px !important;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.ai-spell-btn:hover {
  background: linear-gradient(135deg, #1e1e3f, #1a2550) !important;
  border-color: #7b7bff88 !important;
  color: #c0c8ff !important;
  box-shadow: 0 0 12px #4a4aff33;
}

.ai-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #7b7bff;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1)
  }

  50% {
    opacity: 0.5;
    transform: scale(0.8)
  }
}

/* Content area */
.nb-content-area {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0 0 10px 10px;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  line-height: 1.7;
  padding: 16px;
  min-height: 380px;
  outline: none;
  resize: none;
}

.nb-content-area:focus {
  border-color: var(--red);
}

/* AI status */
.ai-status {
  font-size: 11px;
  color: #7b7bff;
  margin-top: 6px;
  min-height: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ai-loading {
  display: inline-block;
  width: 10px;
  height: 10px;
  border: 2px solid #7b7bff33;
  border-top-color: #7b7bff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Comments */
.nb-section-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 28px 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nb-section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.comment-input-row {
  display: flex;
  gap: 8px;
}

.comment-input-row input {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  padding: 9px 14px;
  outline: none;
}

.comment-input-row input:focus {
  border-color: var(--red);
}

.comment-input-row button {
  background: var(--red);
  border: none;
  color: #fff;
  border-radius: 8px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.comments-list {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.comment-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text);
}

.comment-item .c-author {
  font-weight: 600;
  color: var(--red);
  margin-bottom: 2px;
  font-size: 11px;
}

/* ── RIGHT PANEL ── */
.nb-right {
  background: var(--surface);
  padding: 24px 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.nb-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}

.nb-card-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nb-card-title svg {
  opacity: 0.6;
}

/* Publish Card */
.status-select,
.priority-select,
.author-select,
.assigned-select,
.deadline-inp {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  padding: 8px 10px;
  outline: none;
  margin-bottom: 10px;
  appearance: none;
  -webkit-appearance: none;
}

.status-select:focus,
.priority-select:focus,
.deadline-inp:focus {
  border-color: var(--red);
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.toggle-label {
  font-size: 13px;
  color: var(--text);
}

.toggle {
  position: relative;
  width: 36px;
  height: 20px;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: 20px;
  cursor: pointer;
  transition: 0.3s;
}

.toggle-slider:before {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: 0.3s;
}

.toggle input:checked+.toggle-slider {
  background: var(--red);
}

.toggle input:checked+.toggle-slider:before {
  transform: translateX(16px);
}

.publish-btn {
  width: 100%;
  background: var(--red);
  border: none;
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 700;
  padding: 11px;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity 0.2s;
  margin-top: 4px;
}

.publish-btn:hover {
  opacity: 0.88;
}

.draft-btn {
  width: 100%;
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  padding: 9px;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 6px;
  transition: all 0.2s;
}

.draft-btn:hover {
  border-color: var(--text);
  color: var(--text);
}

/* Image Card */
.image-drop {
  border: 2px dashed var(--border);
  border-radius: 10px;
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.image-drop:hover {
  border-color: var(--red);
  background: var(--red-dim);
}

.image-drop input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.image-drop svg {
  color: var(--muted);
  margin-bottom: 8px;
}

.image-drop p {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}

.image-drop p strong {
  color: var(--red);
}

.image-preview {
  width: 100%;
  border-radius: 8px;
  margin-top: 10px;
  display: none;
  object-fit: cover;
  max-height: 160px;
}

.img-url-inp {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  padding: 8px 10px;
  outline: none;
  margin-top: 8px;
}

.img-url-inp:focus {
  border-color: var(--red);
}

/* Categories */
.cat-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 200px;
  overflow-y: auto;
}

.cat-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.15s;
  border: 1px solid transparent;
}

.cat-item:hover {
  background: var(--surface2);
}

.cat-item.selected {
  background: var(--red-dim);
  border-color: var(--red);
}

.cat-checkbox {
  width: 16px;
  height: 16px;
  border: 2px solid var(--border);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s;
}

.cat-item.selected .cat-checkbox {
  background: var(--red);
  border-color: var(--red);
}

.cat-check-icon {
  color: #fff;
  font-size: 10px;
  display: none;
}

.cat-item.selected .cat-check-icon {
  display: block;
}

.cat-name {
  font-size: 13px;
  color: var(--text);
}

/* SEO Card */
.seo-score-ring {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.ring-wrap {
  position: relative;
  width: 52px;
  height: 52px;
  flex-shrink: 0;
}

.ring-wrap svg {
  transform: rotate(-90deg);
}

.ring-num {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.seo-score-info {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.seo-score-info strong {
  color: var(--text);
  display: block;
  font-size: 13px;
}

.seo-keywords-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
  min-height: 32px;
}

.seo-kw {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 11px;
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s;
}

.seo-kw:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.seo-kw.active {
  background: var(--red-dim);
  border-color: var(--red);
  color: #ff6b6b;
}

.ai-kw-btn {
  width: 100%;
  background: linear-gradient(135deg, #0d0d1f, #111827);
  border: 1px solid #4a4aff44;
  color: #a0a8ff;
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 9px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.ai-kw-btn:hover {
  box-shadow: 0 0 16px #4a4aff22;
  border-color: #7b7bff66;
}

.seo-meta-inp {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  padding: 8px 10px;
  outline: none;
  margin-top: 8px;
  resize: none;
}

.seo-meta-inp:focus {
  border-color: var(--red);
}

.seo-char-count {
  font-size: 10px;
  color: var(--muted);
  text-align: right;
  margin-top: 3px;
}

/* Hidden original form */
.original-form-fields {
  display: none !important;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

/* Submit row */
.nb-submit-row {
  display: none !important;
}

@media (max-width: 900px) {
  .nb-editor-wrap {
    grid-template-columns: 1fr;
  }

  .nb-left {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
}

#content {
  padding: 0 !important;
  background: var(--bg) !important;
}

#content-main {
  padding: 0 !important;
}

.breadcrumbs,
#content h1 {
  display: none !important;
}

#header {
  background: #111 !important;
  border-bottom: 1px solid var(--border) !important;
}

/* ═══════════════════════════════════════════════════════
   SEO PANEL — full-width below editor
═══════════════════════════════════════════════════════ */
.seo-panel {
  margin: 5px 25px 40px;
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 16px;
  overflow: hidden;
  /* box-shadow: 0 2px 16px rgba(37, 99, 235, 0.06); */
}

/* Header */
.seo-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 18px 22px;
  background: linear-gradient(135deg, #f0f6ff 0%, #eaf0fd 100%);
  border-bottom: 1.5px solid #e2e8f0;
}

.seo-panel-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.seo-panel-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #162c6b 0%, #0f1f3d 100%);
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(22, 44, 107, 0.25);
}

.seo-panel-title {
  font-size: 15px;
  font-weight: 600;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.seo-panel-sub {
  font-size: 11.5px;
  color: #64748b;
  margin-top: 2px;
}

/* Score badge in header */
.seo-panel-score-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 8px 16px 8px 8px;
}

.seo-badge-nums {
  display: flex;
  flex-direction: column;
}

.seo-badge-n {
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1;
}

.seo-badge-label {
  font-size: 10px;
  color: #64748b;
  margin-top: 2px;
}

/* 3-column grid */
.seo-grid3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}

.seo-col-card {
  padding: 20px 22px;
  border-right: 1px solid #e2e8f0;
}

.seo-col-card:last-child {
  border-right: none;
}

.seo-col-heading {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #162c6b;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 1.5px solid #e2e8f0;
}

.seo-col-heading svg {
  opacity: 0.8;
  flex-shrink: 0;
}

/* Fields */
.seo-field {
  margin-bottom: 18px;
}

.seo-field:last-child {
  margin-bottom: 0;
}

.seo-field-label {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 7px;
}

.seo-field-label svg {
  opacity: 0.7;
  flex-shrink: 0;
}

.seo-hint {
  font-size: 10.5px;
  color: #94a3b8;
  margin-top: 5px;
  line-height: 1.55;
}

.seo-hint code {
  background: #f1f5f9;
  padding: 0 4px;
  border-radius: 3px;
  font-size: 10px;
  color: #162c6b;
}

/* Tags */
.seo-tag {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.seo-tag--auto {
  background: rgba(22, 44, 107, 0.1);
  color: #162c6b;
}

.seo-tag--locked {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
}

.seo-tag--editable {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
}

/* Inputs */
.seo-inp {
  width: 100%;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  color: #0f172a;
  font-size: 13px;
  padding: 8px 11px;
  outline: none;
  transition: border 0.2s, box-shadow 0.2s, background 0.2s;
  font-family: inherit;
}

.seo-inp:focus {
  border-color: #162c6b;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(22, 44, 107, 0.10);
}

.seo-inp[readonly] {
  background: #f1f5f9;
  color: #64748b;
  cursor: not-allowed;
}

/* Slug row */
.seo-slug-row {
  display: flex;
  align-items: stretch;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
  transition: border 0.2s, box-shadow 0.2s;
}

.seo-slug-row:focus-within {
  border-color: #162c6b;
  box-shadow: 0 0 0 3px rgba(22, 44, 107, 0.10);
  background: #fff;
}

.seo-slug-pre {
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
  background: #f1f5f9;
  border-right: 1px solid #e2e8f0;
  padding: 8px 9px;
  white-space: nowrap;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.seo-slug-inp {
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  flex: 1;
  padding: 8px 9px;
  font-size: 13px;
  color: #0f172a;
  outline: none;
  min-width: 0;
}

.seo-slug-auto {
  background: none;
  border: none;
  border-left: 1px solid #e2e8f0;
  color: #162c6b;
  font-size: 15px;
  font-weight: 700;
  padding: 0 11px;
  cursor: pointer;
  transition: background 0.15s;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.seo-slug-auto:hover {
  background: rgba(22, 44, 107, 0.08);
}

/* Keywords chips */
.seo-kw-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 32px;
  align-items: flex-start;
  padding: 2px 0 6px;
}

.seo-kw-placeholder {
  font-size: 11px;
  color: #94a3b8;
  font-style: italic;
}

.seo-kw {
  background: #f1f5f9;
  border: 1.5px solid #e2e8f0;
  border-radius: 20px;
  padding: 3px 11px;
  font-size: 11px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}

.seo-kw:hover {
  border-color: #162c6b;
  color: #162c6b;
  background: #fff;
}

.seo-kw.active {
  background: #162c6b;
  border-color: #162c6b;
  color: #fff;
  box-shadow: 0 2px 8px rgba(22, 44, 107, 0.25);
}

.seo-ai-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  background: rgba(22, 44, 107, 0.07) !important;
  border: 1.5px solid rgba(22, 44, 107, 0.2) !important;
  color: #162c6b !important;
  font-size: 11.5px;
  font-weight: 700;
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  letter-spacing: 0.02em;
}

.seo-ai-btn:hover {
  background: #162c6b !important;
  color: #fff !important;
  border-color: #162c6b !important;
}

/* Schema box */
.seo-schema-box {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 9px;
  padding: 12px 14px;
}

.schema-type-row {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.schema-type-chip {
  background: rgba(22, 44, 107, 0.1);
  color: #162c6b;
  font-size: 9.5px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.04em;
}

.schema-kv {
  display: flex;
  gap: 8px;
  align-items: baseline;
  margin-bottom: 5px;
  font-size: 14px;
}

.schema-k {
  font-family: 'Courier New', monospace;
  font-size: 13px;
  color: #162c6b;
  min-width: 105px;
  flex-shrink: 0;
}

.schema-v {
  color: #475569;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 140px;
}

.schema-v--live {
  color: #0f172a;
  font-weight: 600;
}

.schema-note {
  font-size: 10px;
  color: #94a3b8;
  line-height: 1.55;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid #e2e8f0;
}

.schema-note code {
  background: #e8edf5;
  padding: 0 3px;
  border-radius: 3px;
  font-size: 9.5px;
  color: #162c6b;
}

.schema-note em {
  color: #162c6b;
  font-style: normal;
  font-weight: 600;
}

/* Sitemap list */
.seo-sitemap-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sitemap-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 8px;
  border: 1.5px solid #e2e8f0;
  background: #fff;
}

.sitemap-row--active {
  border-color: rgba(37, 99, 235, 0.18);
  background: rgba(37, 99, 235, 0.025);
}

.sitemap-led {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.sitemap-led--blue {
  background: #162c6b;
  box-shadow: 0 0 0 2px rgba(22, 44, 107, 0.2);
}

.sitemap-led--green {
  background: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.sitemap-led--grey {
  background: #cbd5e1;
}

.sitemap-body {
  flex: 1;
  min-width: 0;
}

.sitemap-name {
  font-size: 11.5px;
  font-weight: 700;
  color: #0f172a;
}

.sitemap-url {
  font-size: 10px;
  color: #94a3b8;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sitemap-badge {
  font-size: 9px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  flex-shrink: 0;
}

.sitemap-badge--on {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
}

/* Toggle */
.seo-toggle {
  position: relative;
  display: inline-block;
}

.seo-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.seo-toggle-track {
  display: flex;
  align-items: center;
  width: 34px;
  height: 19px;
  background: #cbd5e1;
  border-radius: 19px;
  cursor: pointer;
  transition: background 0.25s;
  padding: 3px;
}

.seo-toggle input:checked+.seo-toggle-track {
  background: #162c6b;
}

.seo-toggle-thumb {
  width: 13px;
  height: 13px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 0.25s;
  flex-shrink: 0;
}

.seo-toggle input:checked+.seo-toggle-track .seo-toggle-thumb {
  transform: translateX(15px);
}

/* Robots */
.seo-robots-checks {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 9px;
}

.seo-robots-item {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  cursor: pointer;
}

.seo-robots-item input {
  display: none;
}

.seo-robots-box {
  width: 16px;
  height: 16px;
  border: 2px solid #e2e8f0;
  border-radius: 4px;
  flex-shrink: 0;
  margin-top: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  background: #fff;
}

.seo-robots-item input:checked+.seo-robots-box {
  background: #ef4444;
  border-color: #ef4444;
}

.seo-robots-item input:checked+.seo-robots-box::after {
  content: '✓';
  color: #fff;
  font-size: 9px;
  font-weight: 800;
}

.seo-robots-name {
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
  display: block;
  font-family: 'Courier New', monospace;
}

.seo-robots-sub {
  font-size: 10.5px;
  color: #94a3b8;
  display: block;
}

.seo-robots-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 7px;
  padding: 7px 11px;
  font-size: 11px;
}

.seo-robots-pre-label {
  color: #94a3b8;
  flex-shrink: 0;
}

#robots_code {
  font-family: 'Courier New', monospace;
  font-size: 11px;
  font-weight: 700;
  color: #162c6b;
  background: rgba(22, 44, 107, 0.08);
  padding: 2px 7px;
  border-radius: 4px;
}

/* Tag control box */
.seo-tag-control-box {
  background: #fffbeb;
  border: 1.5px solid #fde68a;
  border-radius: 8px;
  padding: 10px 12px;
}

.seo-tag-control-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 11px;
  color: #78350f;
  line-height: 1.55;
}

.seo-tag-control-row svg {
  flex-shrink: 0;
  margin-top: 1px;
}

.seo-tag-control-status {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 9px;
  font-size: 10.5px;
  font-weight: 700;
  color: #059669;
}

.seo-tag-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
  flex-shrink: 0;
}

/* Live checklist */
.seo-live-checklist {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.slc-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 9px;
  border-radius: 7px;
  border: 1.5px solid #e2e8f0;
  background: #f8fafc;
  font-size: 11.5px;
  color: #64748b;
  transition: all 0.2s;
}

.slc-item.pass {
  border-color: rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.05);
  color: #059669;
}

.slc-icon {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  transition: all 0.2s;
}

.slc-item.pass .slc-icon {
  border-color: #10b981;
  background: #10b981;
  color: #fff;
}

.slc-item.pass .slc-icon::after {
  content: '✓';
  font-weight: 800;
}

/* Sidebar mini hint */
.seo-sidebar-hint {
  margin-top: 10px;
  font-size: 10.5px;
  color: #94a3b8;
  text-align: center;
  padding: 7px;
  border: 1px dashed #e2e8f0;
  border-radius: 7px;
}

/* Responsive */
@media (max-width: 1100px) {
  .seo-grid3 {
    grid-template-columns: 1fr 1fr;
  }

  .seo-col-card:nth-child(2) {
    border-right: none;
  }

  .seo-col-card:last-child {
    border-top: 1px solid #e2e8f0;
    grid-column: 1 / -1;
  }
}

/* ─── Meta description field additions ─── */
.seo-meta-textarea {
  resize: vertical;
  min-height: 70px;
  line-height: 1.55;
  font-family: inherit;
}

.seo-meta-char-badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: none;
  letter-spacing: 0;
}

.seo-meta-meter-wrap {
  width: 100%;
  height: 3px;
  background: #e2e8f0;
  border-radius: 2px;
  margin-top: 6px;
  overflow: hidden;
}

.seo-meta-meter-bar {
  height: 100%;
  width: 0%;
  border-radius: 2px;
  background: #e2e8f0;
  transition: width 0.3s ease, background 0.3s ease;
}

/* ─── Tag Creation Control — permission selector ─── */
.seo-tag-ctrl {
  background: #fffbeb;
  border: 1.5px solid #fde68a;
  border-radius: 9px;
  padding: 12px 13px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.seo-tag-warn {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 11px;
  color: #92400e;
  line-height: 1.5;
}

.seo-tag-warn svg {
  flex-shrink: 0;
  margin-top: 1px;
}

.seo-tag-perm-label {
  font-size: 10.5px;
  font-weight: 700;
  color: #78350f;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.seo-tag-perm-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.seo-tag-perm-opt {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  cursor: pointer;
  padding: 7px 10px;
  border-radius: 7px;
  border: 1.5px solid transparent;
  background: rgba(255, 255, 255, 0.6);
  transition: all 0.15s;
}

.seo-tag-perm-opt:hover {
  background: #ffffff;
  border-color: #fcd34d;
}

.seo-tag-perm-opt input {
  display: none;
}

.seo-tag-perm-box {
  width: 15px;
  height: 15px;
  border: 2px solid #d97706;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  background: #fff;
}

.seo-tag-perm-opt input:checked+.seo-tag-perm-box {
  background: #d97706;
  border-color: #d97706;
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.15);
}

.seo-tag-perm-opt input:checked+.seo-tag-perm-box::after {
  content: '';
  width: 5px;
  height: 5px;
  background: #fff;
  border-radius: 50%;
  display: block;
}

.seo-tag-perm-opt input:checked~div .seo-tag-perm-name {
  color: #92400e;
  font-weight: 700;
}

.seo-tag-perm-name {
  font-size: 12px;
  font-weight: 600;
  color: #44403c;
  display: block;
}

.seo-tag-perm-sub {
  font-size: 10.5px;
  color: #a16207;
  display: block;
  margin-top: 1px;
}

.seo-tag-perm-status {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10.5px;
  font-weight: 700;
  color: #059669;
  padding-top: 4px;
  border-top: 1px solid #fde68a;
}

.seo-tag-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
  flex-shrink: 0;
}

.seo-tag-save-btn {
  width: 100%;
  background: rgba(217, 119, 6, 0.1) !important;
  border: 1.5px solid rgba(217, 119, 6, 0.3) !important;
  color: #92400e !important;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 700;
  padding: 7px;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.02em;
}

.seo-tag-save-btn:hover:not(:disabled) {
  background: #d97706 !important;
  border-color: #d97706 !important;
  color: #fff !important;
}

.seo-tag-save-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* ─── Live Checklist — clickable ─── */
.slc-item {
  cursor: pointer;
  user-select: none;
  position: relative;
}

.slc-item:hover {
  border-color: #162c6b !important;
  background: rgba(22, 44, 107, 0.04) !important;
  color: #0f1f3d !important;
}

.slc-item:hover .slc-icon {
  border-color: #162c6b;
}

.slc-item.pass:hover {
  border-color: rgba(16, 185, 129, 0.5) !important;
  background: rgba(16, 185, 129, 0.08) !important;
}

.slc-jump {
  margin-left: auto;
  opacity: 0;
  flex-shrink: 0;
  color: #162c6b;
  transition: opacity 0.15s;
}

.slc-item:hover .slc-jump {
  opacity: 1;
}

.slc-item.pass .slc-jump {
  color: #10b981;
}

.slc-item:active {
  transform: scale(0.98);
}

/* =====================================================
   News4Bharat — User Management Page Styles
   Font: Poppins (loaded via template extrahead)
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

/* ── CSS Variables ── */
:root {
  --red: #D80100;
  --red-dark: #a80000;
  --red-light: #fff0f0;
  --red-glow: rgba(216, 1, 0, 0.12);
  --dark: #0f0f0f;
  --surface: #ffffff;
  --surface2: #f8f8f8;
  --border: #ebebeb;
  --text: #1a1a1a;
  --text-muted: #888;
  --green: #16a34a;
  --amber: #d97706;
  --blue: #1d4ed8;
  --shadow: 0 2px 16px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.12);
}

/* ── Django admin overrides ── */
#content {
  padding: 0 !important;
  background: #f4f4f6 !important;
}

#content-main {
  padding: 0 !important;
}

.um-page {
  padding: 28px 32px;
  min-height: 100vh;
}

/* ══════════════════════════════════════════
   TOP BAR
══════════════════════════════════════════ */
.um-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.um-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.um-title h1 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  letter-spacing: -0.3px;
}

.um-title .badge-count {
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
  letter-spacing: 0.3px;
}

.btn-add-user {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #162c6b;
  color: #fff !important;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 3px 12px #162c6b5c;
}

.btn-add-user:hover {
  background: var(--red-dark);
  transform: translateY(-1px);
  box-shadow: 0 5px 18px rgba(216, 1, 0, 0.35);
  color: #fff;
}

/* ══════════════════════════════════════════
   CONTROLS BAR
══════════════════════════════════════════ */
.um-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

/* Search */
.search-wrap {
  position: relative;
  flex: 1;
  min-width: 220px;
  max-width: 380px;
}

.search-wrap svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.search-wrap input {
  width: 100%;
  padding: 10px 12px 10px 38px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  background: #fff;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-wrap input:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px var(--red-glow);
}

.search-wrap input::placeholder {
  color: #bbb;
}

.btn-search {
  padding: 10px 18px;
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-search:hover {
  background: var(--red-dark);
}

/* ── Dropdown shared ── */
.dropdown-wrap {
  position: relative;
}

.btn-dropdown {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 16px;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}

.btn-dropdown:hover {
  border-color: #ccc;
  box-shadow: var(--shadow);
}

.btn-dropdown.active {
  border-color: var(--red);
  color: var(--red);
}

.btn-dropdown svg {
  transition: transform 0.2s;
}

.btn-dropdown.open svg.chevron {
  transform: rotate(180deg);
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  min-width: 220px;
  z-index: 100;
  padding: 8px;
  animation: dropIn 0.15s ease;
}

.dropdown-menu.show {
  display: block;
}

@keyframes dropIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dropdown-section {
  padding: 6px 4px 4px;
}

.dropdown-section-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  padding: 0 8px 6px;
}

.dropdown-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text);
  transition: background 0.15s;
}

.dropdown-option:hover {
  background: var(--red-light);
  color: var(--red);
}

.dropdown-option input[type="radio"],
.dropdown-option input[type="checkbox"] {
  accent-color: var(--red);
}

.dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 6px 0;
}

.btn-apply-filter {
  width: 100%;
  padding: 9px;
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 6px;
  transition: background 0.2s;
}

.btn-apply-filter:hover {
  background: var(--red-dark);
}

/* ══════════════════════════════════════════
   STATS STRIP
══════════════════════════════════════════ */
.um-stats {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.stat-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 30px;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  box-shadow: var(--shadow);
}

.stat-pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.stat-pill .val {
  font-weight: 700;
  color: var(--text);
}

/* ══════════════════════════════════════════
   TABLE CARD
══════════════════════════════════════════ */
.um-table-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: var(--shadow);
  border: 1.5px solid var(--border);
  overflow: hidden;
}

.table-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: #fafafa;
}

.table-header-bar span {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.selected-info {
  font-size: 12px;
  color: var(--red);
  font-weight: 600;
  display: none;
}

.selected-info.visible {
  display: inline;
}

/* ── Table ── */
table.um-table {
  width: 100%;
  border-collapse: collapse;
}

.um-table thead tr {
  background: #fafafa;
  border-bottom: 2px solid var(--border);
}

.um-table th {
  padding: 13px 16px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--text-muted);
  text-align: left;
  white-space: nowrap;
  user-select: none;
}

.um-table th.sortable {
  cursor: pointer;
}

.um-table th.sortable:hover {
  color: var(--red);
}

.um-table td {
  padding: 14px 16px;
  font-size: 13px;
  color: var(--text);
  border-bottom: 1px solid #f0f0f0;
  vertical-align: middle;
}

.um-table tbody tr {
  transition: background 0.15s;
}

.um-table tbody tr:hover {
  background: #fafafa;
}

.um-table tbody tr:last-child td {
  border-bottom: none;
}

.um-table tbody tr.selected {
  background: var(--red-light);
}

/* Checkbox column */
.um-table .col-check {
  width: 44px;
  text-align: center;
}

.um-table input[type="checkbox"] {
  accent-color: var(--red);
  width: 15px;
  height: 15px;
  cursor: pointer;
}

/* ── Avatar + name cell ── */
.user-cell {
  display: flex;
  align-items: center;
  gap: 11px;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.user-name {
  font-weight: 600;
  font-size: 13px;
  color: var(--text);
}

.user-email {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}

/* ── Staff ID badge ── */
.staff-id-badge {
  font-size: 12px;
  font-weight: 600;
  background: #f0f0f0;
  color: #555;
  padding: 4px 10px;
  border-radius: 6px;
  letter-spacing: 0.3px;
  display: inline-block;
}

/* ── Role badges ── */
.role-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 0.2px;
}

.role-badge.rep {
  background: #eff6ff;
  color: #1d4ed8;
}

.role-badge.edt {
  background: #f0fdf4;
  color: #16a34a;
}

.role-badge.sad {
  background: var(--red-light);
  color: var(--red);
}

.role-badge.gen {
  background: #fefce8;
  color: #a16207;
}

.role-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* ── Status chips ── */
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
}

.status-chip.active {
  background: #f0fdf4;
  color: #16a34a;
}

.status-chip.inactive {
  background: #f8f8f8;
  color: #999;
}

.status-chip.suspended {
  background: #fff7ed;
  color: #ea580c;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* ── Failed attempts bar ── */
.attempts-bar-wrap {
  min-width: 90px;
}

.attempts-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 3px;
}

.attempts-bar {
  height: 4px;
  background: #f0f0f0;
  border-radius: 2px;
  overflow: hidden;
}

.attempts-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.3s;
}

.fill-0 {
  background: #d1fae5;
  width: 0%;
}

.fill-1 {
  background: var(--amber);
  width: 33%;
}

.fill-2 {
  background: #f97316;
  width: 66%;
}

.fill-3 {
  background: var(--red);
  width: 100%;
}

/* ── Action buttons ── */
.action-btns {
  display: flex;
  align-items: center;
  gap: 5px;
}

.btn-icon {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--border);
  background: #fff;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 14px;
  flex-shrink: 0;
}

.btn-icon:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.btn-icon.view:hover {
  border-color: var(--blue);
  color: var(--blue);
  background: #eff6ff;
}

.btn-icon.edit:hover {
  border-color: var(--green);
  color: var(--green);
  background: #f0fdf4;
}

.btn-icon.delete:hover {
  border-color: var(--red);
  color: var(--red);
  background: var(--red-light);
}

.btn-profile {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 7px;
  border: 1.5px solid var(--blue);
  background: #eff6ff;
  color: var(--blue);
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.btn-profile:hover {
  background: var(--blue);
  color: #fff !important;
}

/* ── Empty state ── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state svg {
  margin-bottom: 12px;
  opacity: 0.3;
}

.empty-state p {
  font-size: 14px;
  font-weight: 500;
}

/* ══════════════════════════════════════════
   PAGINATION
══════════════════════════════════════════ */
.um-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: #fafafa;
  flex-wrap: wrap;
  gap: 10px;
}

.pagination-info {
  font-size: 12px;
  color: var(--text-muted);
}

.pagination-btns {
  display: flex;
  gap: 5px;
}

.pg-btn {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  border: 1.5px solid var(--border);
  background: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  text-decoration: none;
}

.pg-btn:hover,
.pg-btn.active {
  background: #162c6b;
  color: #fff !important;
  border-color: #162c6b;
}

/* ══════════════════════════════════════════
   SELECT-ALL BAR
══════════════════════════════════════════ */
.select-all-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  background: var(--red-light);
  border: 1.5px solid #fca5a5;
  border-radius: 8px;
  padding: 10px 16px;
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--red);
  font-weight: 600;
}

.select-all-bar.visible {
  display: flex;
}

.select-all-bar button {
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

/* ══════════════════════════════════════════
   TOAST NOTIFICATION
══════════════════════════════════════════ */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--dark);
  color: #fff;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  transform: translateY(80px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* ══════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════ */
@media (max-width: 900px) {
  .um-page {
    padding: 16px;
  }

  .um-table th:nth-child(5),
  .um-table td:nth-child(5) {
    display: none;
  }
}

/* =====================================================
   News4Bharat — User Profile Page Styles
   Font: Poppins
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* ── Variables ── */
:root {
  --red: #D80100;
  --red-dark: #a80000;
  --red-light: #fff5f5;
  --red-glow: rgba(216, 1, 0, 0.10);
  --text: #1a1a1a;
  --text-muted: #8a8a9a;
  --text-light: #b0b0c0;
  --border: #eaeaf0;
  --bg: #f5f5fa;
  --surface: #ffffff;
  --green: #16a34a;
  --amber: #d97706;
  --blue: #1d4ed8;
  --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.06);
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.12);
  --radius: 14px;
}

/* ── Django overrides ── */
#content {
  padding: 0 !important;
  background: var(--bg) !important;
}

#content-main {
  padding: 0 !important;
}

/* ── Base ── */
.up-page * {
  font-family: 'Poppins', sans-serif;
  box-sizing: border-box;
}

/* ══════════════════════════════
   PAGE LAYOUT
══════════════════════════════ */
.up-page {
  padding: 28px 32px;
  min-height: 100vh;
  background: var(--bg);
}

/* Breadcrumb */
.up-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.up-breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
}

.up-breadcrumb a:hover {
  color: var(--red);
}

.up-breadcrumb .sep {
  color: var(--text-light);
}

.up-breadcrumb .current {
  color: var(--text);
  font-weight: 500;
}

/* Grid */
.up-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 20px;
  align-items: start;
}

/* ══════════════════════════════
   LEFT PANEL — Avatar Card
══════════════════════════════ */
.up-avatar-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.up-avatar-header {
  background: linear-gradient(135deg, #162c6b 0%, #162c6b42 100%);
  height: 80px;
  position: relative;
}

.up-avatar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 24px 24px;
  margin-top: -36px;
  position: relative;
}

.up-avatar {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  border: 3px solid var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  box-shadow: var(--shadow);
  flex-shrink: 0;
}

.up-avatar-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-top: 10px;
  text-align: center;
}

.up-avatar-username {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.up-staff-id {
  margin-top: 12px;
  background: #f0f0f8;
  border-radius: 8px;
  padding: 8px 16px;
  text-align: center;
  width: 100%;
}

.up-staff-id .label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  font-weight: 600;
}

.up-staff-id .value {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.5px;
  margin-top: 2px;
}

/* Status badge */
.up-status-row {
  display: flex;
  justify-content: center;
  margin-top: 12px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 20px;
}

.status-badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.status-badge.active {
  background: #f0fdf4;
  color: var(--green);
}

.status-badge.inactive {
  background: #f8f8f8;
  color: #999;
}

.status-badge.suspended {
  background: #fff7ed;
  color: #ea580c;
}

/* Divider */
.up-card-divider {
  height: 1px;
  background: var(--border);
  margin: 0 16px;
}

/* Meta rows */
.up-meta-list {
  padding: 16px;
}

.up-meta-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 8px;
  border-radius: 8px;
  transition: background 0.15s;
}

.up-meta-item:hover {
  background: #fafafa;
}

.up-meta-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #f5f5fa;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-muted);
}

.up-meta-info .meta-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-light);
  font-weight: 600;
}

.up-meta-info .meta-value {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  margin-top: 1px;
}

.up-meta-info .meta-value.empty {
  color: var(--text-light);
  font-style: italic;
}

/* Roles section in left panel */
.up-roles-section {
  padding: 16px;
}

.up-section-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.role-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  margin: 3px 2px;
}

.role-pill.rep {
  background: #eff6ff;
  color: #1d4ed8;
}

.role-pill.edt {
  background: #f0fdf4;
  color: #16a34a;
}

.role-pill.sad {
  background: var(--red-light);
  color: var(--red);
}

.role-pill.gen {
  background: #fefce8;
  color: #a16207;
}

.role-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

/* ══════════════════════════════
   RIGHT PANEL — Tabs + Content
══════════════════════════════ */
.up-right {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Tab bar */
.up-tabs {
  display: flex;
  gap: 4px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 5px;
  box-shadow: var(--shadow-sm);
}

.up-tab {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border: none;
  background: transparent;
  transition: all 0.2s;
  white-space: nowrap;
}

.up-tab:hover {
  color: var(--text);
  background: #f5f5fa;
}

.up-tab.active {
  background: var(--red);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 3px 10px rgba(216, 1, 0, 0.25);
}

.up-tab svg {
  opacity: 0.7;
}

.up-tab.active svg {
  opacity: 1;
}

/* Tab panels */
.up-tab-panel {
  display: none;
}

.up-tab-panel.active {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ── Section Card ── */
.up-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.up-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: #fafafa;
}

.up-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.up-card-title svg {
  color: var(--red);
}

/* Admin-only edit badge */
.admin-only-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  background: #f0f0f8;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 0.3px;
}

/* ── Field Grid ── */
.up-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.up-fields.single {
  grid-template-columns: 1fr;
}

.up-fields.three {
  grid-template-columns: 1fr 1fr 1fr;
}

.up-field {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  transition: background 0.15s;
}

.up-field:hover {
  background: #fafafa;
}

.up-field:nth-child(even) {
  border-right: none;
}

.up-fields.single .up-field {
  border-right: none;
}

.up-fields.three .up-field:nth-child(3n) {
  border-right: none;
}

/* Remove bottom border from last row */
.up-fields .up-field:last-child,
.up-fields .up-field:nth-last-child(2):nth-child(odd) {
  border-bottom: none;
}

.up-field-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--text-muted);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.up-field-value {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  word-break: break-word;
}

.up-field-value.empty {
  color: var(--text-light);
  font-style: italic;
  font-size: 13px;
}

.up-field-value.mono {
  font-family: 'Courier New', monospace;
  font-size: 13px;
  background: #f5f5fa;
  padding: 4px 10px;
  border-radius: 6px;
  display: inline-block;
}

.up-field-value.masked {
  color: var(--text-light);
  letter-spacing: 3px;
  font-size: 16px;
}

/* Inline chips inside field value */
.perm-chip {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 500;
  background: #f0f4ff;
  color: var(--blue);
  padding: 3px 10px;
  border-radius: 12px;
  margin: 2px 3px 2px 0;
}

.perm-chip.extra {
  background: #f0fdf4;
  color: var(--green);
}

.perm-chip.none {
  background: #f5f5fa;
  color: var(--text-light);
  font-style: italic;
}

/* Category chips */
.cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 500;
  background: #fef9ec;
  color: #b45309;
  padding: 3px 10px;
  border-radius: 12px;
  margin: 2px 3px 2px 0;
}

/* ── Security indicators ── */
.attempt-bar-wrap {
  margin-top: 4px;
}

.attempt-track {
  height: 5px;
  background: #f0f0f8;
  border-radius: 3px;
  overflow: hidden;
  margin-top: 5px;
}

.attempt-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
}

.attempt-fill.f0 {
  width: 5%;
  background: #d1fae5;
}

.attempt-fill.f1 {
  width: 33%;
  background: var(--amber);
}

.attempt-fill.f2 {
  width: 66%;
  background: #f97316;
}

.attempt-fill.f3 {
  width: 100%;
  background: var(--red);
}

.lock-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
}

.lock-status.locked {
  background: #fff1f1;
  color: var(--red);
}

.lock-status.unlocked {
  background: #f0fdf4;
  color: var(--green);
}

.twofa-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
}

.twofa-status.on {
  color: var(--green);
}

.twofa-status.off {
  color: var(--text-muted);
}

/* ── Session info ── */
.session-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.session-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.2);
}

/* ── Admin edit button ── */
.btn-admin-edit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--red);
  color: #fff !important;
  border: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
  box-shadow: 0 2px 8px rgba(216, 1, 0, 0.2);
}

.btn-admin-edit:hover {
  background: var(--red-dark);
  transform: translateY(-1px);
  color: #fff;
}

/* ── Read-only notice banner ── */
.readonly-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fffbeb;
  border: 1.5px solid #fde68a;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 500;
  color: #92400e;
}

.readonly-notice svg {
  flex-shrink: 0;
  color: #d97706;
}

/* ── Activity log ── */
.activity-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}

.activity-row:hover {
  background: #fafafa;
}

.activity-row:last-child {
  border-bottom: none;
}

.activity-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 14px;
}

.activity-icon.success {
  background: #f0fdf4;
  color: var(--green);
}

.activity-icon.fail {
  background: #fff1f1;
  color: var(--red);
}

.activity-icon.lock {
  background: #fff7ed;
  color: #ea580c;
}

.activity-text {
  flex: 1;
}

.activity-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

.activity-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.activity-time {
  font-size: 11px;
  color: var(--text-light);
  white-space: nowrap;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .up-grid {
    grid-template-columns: 1fr;
  }

  .up-fields {
    grid-template-columns: 1fr;
  }

  .up-field {
    border-right: none !important;
  }

  .up-fields .up-field:nth-last-child(2) {
    border-bottom: 1px solid var(--border);
  }
}

@media (max-width: 600px) {
  .up-page {
    padding: 16px;
  }

  .up-tabs {
    overflow-x: auto;
  }

  .up-tab {
    padding: 8px 12px;
    font-size: 12px;
  }

  .up-fields.three {
    grid-template-columns: 1fr 1fr;
  }
}

/* =====================================================
   News4Bharat — Add New User Form Styles
   Font: Poppins
   Theme: Red (#D80100) with clean white layout
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* ── Variables ── */
:root {
  --red: #D80100;
  --red-dark: #a80000;
  --red-light: #fff5f5;
  --red-glow: rgba(216, 1, 0, 0.10);
  --text: #1a1a1a;
  --text-muted: #6b7280;
  --text-light: #9ca3af;
  --border: #e5e7eb;
  --border-focus: #D80100;
  --bg: #f5f5fa;
  --surface: #ffffff;
  --green: #16a34a;
  --blue: #1d4ed8;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  --radius: 10px;
  --radius-sm: 6px;
}

/* ── Django overrides ── */
#content {
  padding: 0 !important;
  background: var(--bg) !important;
}

#content-main {
  padding: 0 !important;
}

/* ── Base ── */
.au-page * {
  font-family: 'Poppins', sans-serif;
  box-sizing: border-box;
}

/* ══════════════════════════════
   PAGE LAYOUT
══════════════════════════════ */
.au-page {
  padding: 24px 32px 48px;
  min-height: 100vh;
}

/* Breadcrumb / top bar */
.au-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  flex-wrap: wrap;
  gap: 12px;
}

.au-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.au-back:hover {
  color: var(--red);
}

.au-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}

.au-title svg {
  color: var(--red);
}

.au-actions {
  display: flex;
  gap: 10px;
}

.btn-cancel {
  padding: 9px 20px;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
  font-family: 'Poppins', sans-serif;
}

.btn-cancel:hover {
  border-color: #ccc;
  color: var(--text);
}

.btn-save {
  padding: 9px 24px;
  background: var(--red);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 8px #162c6b6b;
  font-family: 'Poppins', sans-serif;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-save:hover {
  background: var(--red-dark);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px #162c6b6b;
}

/* ══════════════════════════════
   MAIN GRID — 2 columns like reference
══════════════════════════════ */
.au-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
  align-items: start;
}

.au-left {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.au-right {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ══════════════════════════════
   SECTION CARD
══════════════════════════════ */
.au-section {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.au-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: #fafafa;
  cursor: pointer;
  user-select: none;
}

.au-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text);
}

.au-section-title svg {
  color: var(--red);
  flex-shrink: 0;
}

.au-section-toggle {
  color: var(--text-light);
  transition: transform 0.2s;
}

.au-section.collapsed .au-section-toggle {
  transform: rotate(-90deg);
}

.au-section-body {
  padding: 18px;
}

.au-section.collapsed .au-section-body {
  display: none;
}

/* Required star */
.req {
  color: var(--red);
  margin-left: 2px;
}

/* ══════════════════════════════
   FIELD ROWS — like reference image
══════════════════════════════ */
.au-row {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
}

.au-row:last-child {
  margin-bottom: 0;
}

.au-row.cols-2 {
  grid-template-columns: 1fr 1fr;
}

.au-row.cols-3 {
  grid-template-columns: 1fr 1fr 1fr;
}

.au-row.cols-1 {
  grid-template-columns: 1fr;
}

/* ── Field ── */
.au-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.au-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.au-input,
.au-select,
.au-textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: 'Poppins', sans-serif;
  color: var(--text);
  background: #fff;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.au-input:focus,
.au-select:focus,
.au-textarea:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px var(--red-glow);
}

.au-input::placeholder,
.au-textarea::placeholder {
  color: var(--text-light);
  font-size: 12px;
}

.au-input.readonly-field,
.au-select.readonly-field {
  background: #f9f9f9;
  color: var(--text-muted);
  cursor: not-allowed;
  border-style: dashed;
}

.au-textarea {
  resize: vertical;
  min-height: 80px;
}

.au-select {
  appearance: none;
  cursor: pointer;
}

/* Phone with flag/code prefix */
.au-phone-wrap {
  display: flex;
  gap: 0;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.au-phone-wrap:focus-within {
  border-color: var(--red);
  box-shadow: 0 0 0 3px var(--red-glow);
}

.au-phone-prefix {
  padding: 9px 10px;
  background: #f5f5fa;
  border-right: 1.5px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
}

.au-phone-input {
  flex: 1;
  padding: 9px 12px;
  border: none;
  outline: none;
  font-size: 13px;
  font-family: 'Poppins', sans-serif;
  color: var(--text);
  background: #fff;
}

.au-phone-input::placeholder {
  color: var(--text-light);
  font-size: 12px;
}

/* Field help text */
.au-help {
  font-size: 11px;
  color: var(--text-light);
  margin-top: 2px;
}

/* Auto-generated badge */
.auto-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 600;
  background: #f0fdf4;
  color: var(--green);
  padding: 2px 8px;
  border-radius: 20px;
  margin-left: 6px;
  letter-spacing: 0.3px;
}

/* Admin-only badge */
.admin-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 600;
  background: var(--red-light);
  color: var(--red);
  padding: 2px 8px;
  border-radius: 20px;
  margin-left: 6px;
  letter-spacing: 0.3px;
}

/* ══════════════════════════════
   ROLES CHECKBOX GRID
══════════════════════════════ */
.au-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
  padding: 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fafafa;
  max-height: 200px;
  overflow-y: auto;
}

.au-check-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s;
  font-size: 13px;
  color: var(--text);
  border: 1.5px solid transparent;
}

.au-check-item:hover {
  background: var(--red-light);
}

.au-check-item input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--red);
  cursor: pointer;
  flex-shrink: 0;
}

.au-check-item.checked {
  background: var(--red-light);
  border-color: rgba(216, 1, 0, 0.2);
}

/* ══════════════════════════════
   PERMISSIONS PREVIEW
══════════════════════════════ */
.au-perms-preview {
  margin-top: 10px;
  padding: 12px 14px;
  background: #fffbeb;
  border: 1.5px dashed #fbbf24;
  border-radius: var(--radius-sm);
  min-height: 42px;
  transition: all 0.2s;
}

.au-perms-preview.has-perms {
  background: #fff5f5;
  border-color: rgba(216, 1, 0, 0.3);
}

.perm-tag {
  display: inline-flex;
  align-items: center;
  background: var(--red);
  color: #fff;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
  margin: 2px 3px;
}

/* ══════════════════════════════
   RIGHT PANEL — Role & Profile
══════════════════════════════ */
.au-info-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #eff6ff;
  border: 1.5px solid #bfdbfe;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 12px;
  color: #1e40af;
  line-height: 1.5;
}

.au-info-notice svg {
  flex-shrink: 0;
  margin-top: 1px;
}

/* Section divider line */
.au-divider {
  height: 1px;
  background: var(--border);
  margin: 16px 0;
}

/* Gender radio group */
.au-radio-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.au-radio-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  color: var(--text);
  transition: all 0.15s;
}

.au-radio-item:hover {
  border-color: var(--red);
  background: var(--red-light);
}

.au-radio-item input[type="radio"] {
  accent-color: var(--red);
  cursor: pointer;
}

.au-radio-item.selected {
  border-color: var(--red);
  background: var(--red-light);
  color: var(--red);
}

/* ══════════════════════════════
   SUBMIT BAR (bottom sticky)
══════════════════════════════ */
.au-submit-bar {
  position: sticky;
  bottom: 0;
  background: #fff;
  border-top: 1.5px solid var(--border);
  padding: 14px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 -45px -85px;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
  z-index: 10;
}

.au-submit-note {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.au-submit-note svg {
  color: var(--green);
}

.au-submit-actions {
  display: flex;
  gap: 10px;
}

/* ══════════════════════════════
   RESPONSIVE
══════════════════════════════ */
@media (max-width: 1024px) {
  .au-grid {
    grid-template-columns: 1fr;
  }

  .au-row.cols-3 {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .au-page {
    padding: 16px;
  }

  .au-row.cols-2,
  .au-row.cols-3 {
    grid-template-columns: 1fr;
  }

  .au-submit-bar {
    padding: 14px 16px;
    margin: 0 -16px -48px;
  }
}

/* ============================================================
   Category Management — category.css
   Theme: blue / white / light-grey (matches News4Bharat admin)
   ============================================================ */

:root {
  --blue: #1a5cff;
  --blue-dark: #1245cc;
  --blue-light: #e8f0ff;
  --blue-mid: #3b72ff;
  --white: #ffffff;
  --g50: #f7f8fc;
  --g100: #eef0f6;
  --g200: #dde1ec;
  --g300: #b8bfd0;
  --g500: #6e7a96;
  --g700: #3a4259;
  --g900: #1a1f35;
  --green: #12b76a;
  --green-lt: #e8faf3;
  --orange: #f79009;
  --orange-lt: #fff8ec;
  --red: #f04438;
  --radius: 10px;
  --radius-sm: 7px;
}

body {
  background: var(--g50);
  color: var(--g900);
  font-size: 14px;
  line-height: 1.5;
  margin: 0px !important;
}

/* ---------- page wrapper ---------- */
.cm-page {
  padding: 28px 32px;
}

/* ---------- page header ---------- */
.cm-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}

.cm-page-header h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--g900);
}

.cm-page-header p {
  font-size: 13px;
  color: var(--g500);
  margin-top: 3px;
}

.cm-page-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

/* ---------- stats row ---------- */
.cm-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.cm-stat {
  background: var(--white);
  border: 1px solid var(--g200);
  border-radius: var(--radius);
  padding: 18px 20px;
}

.cm-stat__label {
  font-size: 11.5px;
  color: var(--g500);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 6px;
}

.cm-stat__val {
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
}

.cm-stat__sub {
  font-size: 11px;
  color: var(--g500);
  margin-top: 5px;
}

.cm-stat--blue .cm-stat__val {
  color: var(--blue);
}

.cm-stat--green .cm-stat__val {
  color: var(--green);
}

.cm-stat--orange .cm-stat__val {
  color: var(--orange);
}

/* ---------- filter bar ---------- */
.cm-filterbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.cm-filter-tab {
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1.5px solid transparent;
  background: none;
  color: var(--g500);
  font-family: inherit;
  transition: all .14s;
}

.cm-filter-tab:hover {
  background: var(--g100);
  color: var(--g700);
}

.cm-filter-tab.active {
  background: var(--blue-light);
  color: var(--blue);
  border-color: #c2d4ff;
  font-weight: 600;
}

.cm-filterbar__spacer {
  flex: 1;
  min-width: 20px;
}

.cm-filterbar__count {
  font-size: 12px;
  color: var(--g300);
  white-space: nowrap;
}

/* ---------- table wrapper ---------- */
.cm-table-wrap {
  background: var(--white);
  border: 1px solid var(--g200);
  border-radius: var(--radius);
  overflow: hidden;
}

/* ---------- table ---------- */
.cm-table {
  width: 100%;
  border-collapse: collapse;
}

.cm-table thead tr {
  background: var(--g50);
  border-bottom: 1.5px solid var(--g200);
}

.cm-table thead th {
  padding: 11px 14px;
  font-size: 11px;
  font-weight: 700;
  color: var(--g500);
  text-align: left;
  text-transform: uppercase;
  letter-spacing: .06em;
  white-space: nowrap;
}

.cm-table thead th:first-child {
  padding-left: 20px;
  width: 50px;
  text-align: center;
}

.cm-table thead th:last-child {
  padding-right: 20px;
  text-align: right;
}

.cm-table tbody tr {
  border-bottom: 1px solid var(--g100);
  transition: background .1s;
}

.cm-table tbody tr:last-child {
  border-bottom: none;
}

.cm-table tbody tr:hover {
  background: #fafbff;
}

.cm-table tbody tr.cm-row--archived {
  opacity: .72;
}

.cm-table td {
  padding: 13px 14px;
  vertical-align: middle;
  font-size: 13.5px;
  color: var(--g900);
}

.cm-table td:first-child {
  padding-left: 20px;
  text-align: center;
}

.cm-table td:last-child {
  padding-right: 20px;
}

/* ---------- serial number cell ---------- */
.cm-serial {
  font-size: 12px;
  font-weight: 700;
  color: var(--g300);
  font-family: 'DM Mono', 'Courier New', monospace;
  min-width: 28px;
}

/* ---------- category name cell ---------- */
.cm-cat-title {
  font-weight: 600;
  font-size: 13.5px;
  display: block;
}

.cm-cat-slug {
  font-size: 11px;
  color: var(--g300);
  font-family: 'DM Mono', monospace;
  display: block;
  margin-top: 1px;
}

/* ---------- expand button ---------- */
.cm-expand-btn {
  background: none;
  border: 1.5px solid var(--g200);
  border-radius: 6px;
  padding: 3px 8px;
  cursor: pointer;
  color: var(--g500);
  font-size: 11px;
  font-family: inherit;
  transition: all .14s;
  white-space: nowrap;
}

.cm-expand-btn:hover {
  background: var(--blue-light);
  color: var(--blue);
  border-color: #c2d4ff;
}

/* ---------- sub-categories row ---------- */
.cm-subrow td {
  background: #f9fbff;
}

.cm-subrow td:first-child {
  padding-left: 20px;
}

.cm-subrow__inner {
  padding: 8px 0 10px;
}

.cm-subrow__section {
  margin-bottom: 10px;
}

.cm-subrow__section:last-child {
  margin-bottom: 0;
}

.cm-subrow__heading {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--g500);
  margin-bottom: 6px;
}

.cm-sub-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--g100);
  color: var(--g700);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  margin: 2px 3px 2px 0;
  cursor: default;
  transition: all .13s;
}

.cm-sub-tag:hover {
  background: var(--blue-light);
  color: var(--blue);
}

/* ---------- badge ---------- */
.cm-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.cm-badge__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.cm-badge--active {
  background: var(--green-lt);
  color: var(--green);
}

.cm-badge--active .cm-badge__dot {
  background: var(--green);
}

.cm-badge--archived {
  background: var(--g100);
  color: var(--g500);
}

.cm-badge--archived .cm-badge__dot {
  background: var(--g500);
}

/* ---------- post count ---------- */
.cm-posts-num {
  font-size: 15px;
  font-weight: 700;
}

.cm-posts-lbl {
  font-size: 11px;
  color: var(--g300);
  display: block;
}

/* ---------- action cell ---------- */
.cm-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.cm-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: all .14s;
  white-space: nowrap;
}

.cm-btn--primary {
  background: var(--blue);
  color: #fff;
  padding: 9px 18px;
  font-size: 13.5px;
  border-radius: var(--radius);
}

.cm-btn--primary:hover {
  background: var(--blue-dark);
}

.cm-btn--outline {
  background: var(--white);
  color: var(--g700);
  border: 1.5px solid var(--g200);
  padding: 9px 18px;
  font-size: 13.5px;
  border-radius: var(--radius);
}

.cm-btn--outline:hover {
  border-color: var(--g300);
  background: var(--g50);
}

.cm-btn--view {
  background: var(--blue-light) !important;
  color: var(--blue) !important;
}

.cm-btn--view:hover {
  background: #ccd9ff;
}

.cm-btn--addpost {
  background: var(--green-lt) !important;
  color: var(--green) !important;
}

.cm-btn--addpost:hover {
  background: #c2f0da !important;
}

.cm-btn--addsub {
  background: var(--g100) !important;
  color: var(--g700) !important;
}

.cm-btn--addsub:hover {
  background: var(--g200) !important;
}

.cm-btn--archive {
  background: var(--orange-lt) !important;
  color: var(--orange) !important;
}

.cm-btn--archive:hover {
  background: #ffe0a0;
}

.cm-btn--restore {
  background: var(--g100) !important;
  color: var(--g500) !important;
}

.cm-btn--restore:hover {
  background: var(--g200);
}

.cm-btn--edit {
  background: #eef4ff !important;
  color: #3b72ff !important;
}

.cm-btn--edit:hover {
  background: #dce9ff !important;
}

.cm-btn--danger {
  background: var(--orange);
  color: #fff;
}

.cm-btn--danger:hover {
  background: #d97706;
}

/* ---------- MODAL ---------- */
.cm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 31, 53, .45);
  z-index: 500;
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(2px);
}

.cm-overlay.open {
  display: flex;
}

.cm-modal {
  background: var(--white);
  border-radius: 14px;
  padding: 32px;
  width: 560px;
  max-width: 95vw;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .16);
  animation: cmModalIn .2s ease;
}

.cm-modal--sm {
  width: 440px;
}

@keyframes cmModalIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(.98);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.cm-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 12px;
}

.cm-modal__header h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--g900);
}

.cm-modal__header p {
  font-size: 13px;
  color: var(--g500);
  margin-top: 4px;
}

.cm-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--g100);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--g500);
  font-size: 20px;
  line-height: 1;
  transition: all .14s;
  flex-shrink: 0;
}

.cm-close-btn:hover {
  background: var(--g200);
}

.cm-form-group {
  margin-bottom: 18px;
}

.cm-form-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--g700);
  margin-bottom: 7px;
  display: block;
}

.cm-form-input,
.cm-form-select,
.cm-form-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--g200);
  border-radius: 8px;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--g900);
  outline: none;
  transition: border .14s;
  background: var(--white);
}

.cm-form-input:focus,
.cm-form-select:focus,
.cm-form-textarea:focus {
  border-color: var(--blue);
}

.cm-form-textarea {
  resize: vertical;
  min-height: 80px;
}

/* sub-categories input inside modal */
.cm-tag-input-wrap {
  border: 1.5px solid var(--g200);
  border-radius: 8px;
  padding: 8px 10px;
  min-height: 48px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  cursor: text;
  background: var(--white);
  transition: border .14s;
}

.cm-tag-input-wrap:focus-within {
  border-color: var(--blue);
}

.cm-tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--blue-light);
  color: var(--blue);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 500;
}

.cm-tag-pill__del {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--blue);
  font-size: 14px;
  line-height: 1;
  padding: 0;
  margin-left: 2px;
  font-family: inherit;
}

.cm-tag-pill__del:hover {
  color: var(--red);
}

.cm-tag-input {
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 13px;
  color: var(--g900);
  min-width: 120px;
  flex: 1;
  background: transparent;
  padding: 2px 4px;
}

.cm-tag-hint {
  font-size: 11.5px;
  color: var(--g300);
  margin-top: 5px;
}

/* section divider inside modal */
.cm-modal-divider {
  border: none;
  border-top: 1px solid var(--g100);
  margin: 22px 0 18px;
}

.cm-section-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--g500);
  margin-bottom: 14px;
}

.cm-modal__actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 24px;
}

/* archive warning box */
.cm-warn-box {
  background: var(--orange-lt);
  border: 1.5px solid #fddcab;
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 13px;
  color: var(--g700);
  line-height: 1.6;
  margin-bottom: 20px;
}

/* ---------- SLIDE PANEL ---------- */
.cm-panel-bg {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .22);
  z-index: 400;
  display: none;
}

.cm-panel-bg.open {
  display: block;
}

.cm-panel {
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  width: 680px;
  max-width: 95vw;
  background: var(--white);
  border-left: 1px solid var(--g200);
  z-index: 410;
  transform: translateX(100%);
  transition: transform .28s cubic-bezier(.4, 0, .2, 1);
  display: flex;
  flex-direction: column;
}

.cm-panel.open {
  transform: translateX(0);
}

.cm-panel__header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--g200);
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.cm-panel__title-wrap {
  flex: 1;
}

.cm-panel__eyebrow {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--g300);
  font-weight: 700;
  margin-bottom: 3px;
}

.cm-panel__header h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--g900);
}

.cm-panel__body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
}

.cm-panel__footer {
  padding: 16px 24px;
  border-top: 1px solid var(--g200);
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

/* post list items */
.cm-post-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--g100);
}

.cm-post-item:last-child {
  border-bottom: none;
}

.cm-post__thumb {
  width: 72px;
  height: 52px;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--blue-light), #d0e0ff);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--blue);
}

.cm-post__info {
  flex: 1;
}

.cm-post__title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--g900);
  line-height: 1.4;
  margin-bottom: 5px;
}

.cm-post__meta {
  font-size: 11.5px;
  color: var(--g500);
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* empty state */
.cm-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.cm-empty__icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.cm-empty p {
  font-size: 14px;
  color: var(--g500);
}

.cm-empty span {
  font-size: 12px;
  color: var(--g300);
  margin-top: 5px;
  display: block;
}

/* ---------- TOAST ---------- */
.cm-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(90px);
  background: var(--g900);
  color: #fff;
  padding: 12px 22px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 500;
  z-index: 999;
  transition: transform .3s ease;
  white-space: nowrap;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cm-toast.show {
  transform: translateX(-50%) translateY(0);
}

.cm-toast--ok {
  background: var(--green);
}

.cm-toast--warn {
  background: var(--orange);
}

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .cm-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 700px) {
  .cm-page {
    padding: 18px 16px;
  }

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

  .cm-panel {
    width: 100%;
  }

  .cm-actions {
    gap: 4px;
  }

  .cm-btn {
    padding: 5px 9px;
    font-size: 11px;
  }
}

/* ═══════════════════════════════════════════════════════════════════
   IMAGE SPECS BOX
═══════════════════════════════════════════════════════════════════ */
.img-specs-box {
  margin-top: 14px;
  background: #f8faff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 14px;
}

.img-specs-title {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.img-spec-rows {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.img-spec-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
}

.img-spec-icon {
  font-size: 13px;
  flex-shrink: 0;
  margin-top: 1px;
}

.img-spec-key {
  color: #64748b;
  margin-right: 4px;
}

.img-spec-val {
  color: #1e293b;
  font-weight: 500;
}

.img-file-info {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #e2e8f0;
}

.img-fi-row {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  padding: 2px 0;
  color: #475569;
}

.img-fi-label {
  font-weight: 600;
  color: #94a3b8;
}

.img-fi-status {
  margin-top: 6px;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  text-align: center;
}

.img-fi-status.ok {
  background: #dcfce7;
  color: #15803d;
}

.img-fi-status.warn {
  background: #fef9c3;
  color: #a16207;
}

.img-fi-status.err {
  background: #fee2e2;
  color: #b91c1c;
}


/* ═══════════════════════════════════════════════════════════════════
   EDITOR PANEL — Outer wrapper
═══════════════════════════════════════════════════════════════════ */
.editor-panel {
  background: var(--card-bg, #fff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 14px;
  margin: 0px 24px 24px;
  overflow: hidden;
}

.editor-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border, #e2e8f0);
  background: linear-gradient(135deg, #f8faff 0%, #fff 100%);
}

.editor-panel-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.editor-panel-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, #162c6b, #7c3aed);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}

.editor-panel-title {
  font-size: 15px;
  font-weight: 700;
  color: #1e293b;
}

.editor-panel-sub {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 2px;
}

.editor-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 0;
}

@media (max-width: 960px) {
  .editor-grid {
    grid-template-columns: 1fr;
  }
}


/* ═══════════════════════════════════════════════════════════════════
   EDITOR FORM COLUMN — Left side
═══════════════════════════════════════════════════════════════════ */
.editor-form-col {
  padding: 22px 24px;
  border-right: 1px solid var(--border, #e2e8f0);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ed-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.ed-label {
  font-size: 11.5px;
  font-weight: 600;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: .04em;
  display: flex;
  align-items: center;
  gap: 5px;
}

.ed-char-badge {
  margin-left: auto;
  font-size: 10.5px;
  font-weight: 600;
  color: #94a3b8;
  font-variant-numeric: tabular-nums;
}

.ed-inp {
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  padding: 8px 11px;
  font-size: 13px;
  color: #1e293b;
  background: #f8faff;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  width: 100%;
  box-sizing: border-box;
}

.ed-inp:focus {
  border-color: #162c6b;
  box-shadow: 0 0 0 3px rgba(22, 44, 107, .12);
  background: #fff;
}

.ed-textarea {
  resize: vertical;
  min-height: 68px;
  font-family: inherit;
}

.ed-hint {
  font-size: 11px;
  color: #94a3b8;
}

.ed-social-row {
  display: flex;
  gap: 10px;
}

/* Search box */
.ed-search-wrap {
  position: relative;
}

.ed-search-inp {
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  padding: 8px 34px 8px 11px;
  font-size: 13px;
  color: #1e293b;
  background: #f8faff;
  outline: none;
  width: 100%;
  box-sizing: border-box;
  transition: border-color .2s, box-shadow .2s;
}

.ed-search-inp:focus {
  border-color: #162c6b;
  box-shadow: 0 0 0 3px rgba(22, 44, 107, .12);
  background: #fff;
}

.ed-search-icon {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
}

/* Editor list */
.ed-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 200px;
  overflow-y: auto;
  margin-top: 6px;
}

.ed-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border: 1.5px solid #e2e8f0;
  border-radius: 9px;
  cursor: pointer;
  background: #f8faff;
  transition: border-color .15s, background .15s;
}

.ed-card:hover {
  border-color: #93c5fd;
  background: #eff6ff;
}

.ed-card.selected {
  border-color: #162c6b;
  background: #eff6ff;
}

.ed-card-av {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #162c6b, #7c3aed);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  overflow: hidden;
}

.ed-card-av img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.ed-card-info {
  flex: 1;
  min-width: 0;
}

.ed-card-name {
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
}

.ed-card-pos {
  font-size: 11px;
  color: #64748b;
  margin-top: 1px;
}

.ed-card-check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all .15s;
}

.ed-card.selected .ed-card-check {
  background: #162c6b;
  border-color: #162c6b;
  color: #fff;
}

/* Photo circle preview */
.ed-photo-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ed-avatar-preview {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6366f1;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid #e2e8f0;
}

.ed-avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}


/* ═══════════════════════════════════════════════════════════════════
   PREVIEW COLUMN — Right side
═══════════════════════════════════════════════════════════════════ */
.editor-preview-col {
  padding: 22px 24px;
  background: #f0f4f8;
}

.ed-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.ed-preview-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.ed-preview-tabs {
  display: flex;
  gap: 4px;
}

.ed-tab {
  padding: 5px 11px;
  border-radius: 6px;
  font-size: 11.5px;
  border: 1.5px solid #e2e8f0;
  background: #fff;
  color: #64748b;
  cursor: pointer;
  transition: all .15s;
}

.ed-tab.active {
  background: #162c6b;
  color: #fff;
  border-color: #162c6b;
}


/* ═══════════════════════════════════════════════════════════════════
   ARTICLE SHARE CARD — Desktop Preview
═══════════════════════════════════════════════════════════════════ */
.ed-preview-frame {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .06);
}

.prev-card-outer {
  padding: 28px 24px 20px;
  background: #eef2f7;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

/* The card */
.prev-card {
  width: 100%;
  max-width: 540px;
  background: #ffffff;
  border: 1px solid #d1d9e0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0, 0, 0, .11);
  transition: box-shadow .2s;
}

.prev-card:hover {
  box-shadow: 0 8px 36px rgba(0, 0, 0, .16);
}

/* Top bar */
.prev-card-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px 9px;
  border-bottom: 1px solid #f1f5f9;
  background: #fafbfc;
}

.prev-card-logo-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.prev-card-logo-icon {
  width: 22px;
  height: 22px;
  background: linear-gradient(135deg, #1d4ed8, #7c3aed);
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

.prev-card-site-info {
  display: flex;
  flex-direction: column;
}

.prev-card-site-name {
  font-size: 11.5px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
}

.prev-card-site-link {
  font-size: 10px;
  color: #94a3b8;
  line-height: 1.2;
  font-family: monospace;
}

.prev-card-source-badge {
  font-size: 9.5px;
  font-weight: 600;
  color: #64748b;
  background: #f1f5f9;
  border-radius: 4px;
  padding: 2px 7px;
}

/* Body row: text + image */
.prev-card-body {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 14px 12px;
}

.prev-card-text {
  flex: 1;
  min-width: 0;
}

.prev-card-category {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: #162c6b;
  margin-bottom: 5px;
}

.prev-card-headline {
  font-size: 14.5px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.35;
  margin: 0 0 6px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.prev-card-summary {
  font-size: 12px;
  color: #64748b;
  line-height: 1.55;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Thumbnail */
.prev-card-img-wrap {
  width: 100px;
  height: 84px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
}

.prev-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.prev-card-img-ph {
  color: #cbd5e1;
}

/* Footer bar */
.prev-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 14px 11px;
  border-top: 1px solid #f1f5f9;
  background: #fafbfc;
}

.prev-card-author {
  display: flex;
  align-items: center;
  gap: 8px;
}

.prev-card-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #162c6b, #7c3aed);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  overflow: hidden;
  flex-shrink: 0;
  border: 1.5px solid #e2e8f0;
  position: relative;
}

.prev-card-author-info {
  display: flex;
  align-items: center;
  gap: 4px;
}

.prev-card-author-name {
  font-size: 11.5px;
  font-weight: 600;
  color: #1e293b;
}

.prev-card-author-dot {
  font-size: 10px;
  color: #cbd5e1;
}

.prev-card-author-pos {
  font-size: 10.5px;
  color: #94a3b8;
}

.prev-card-time {
  font-size: 10.5px;
  color: #94a3b8;
}

/* Label beneath card */
.prev-card-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  color: #94a3b8;
  font-style: italic;
}


/* ═══════════════════════════════════════════════════════════════════
   MOBILE PREVIEW
═══════════════════════════════════════════════════════════════════ */
.ed-preview-mobile {
  background: #dde3eb !important;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 28px 0 24px;
}

.prev-mobile-scene {
  display: flex;
  justify-content: center;
}

.prev-mobile-phone {
  width: 230px;
  background: #f8faff;
  border-radius: 28px;
  border: 7px solid #1e293b;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .25), inset 0 0 0 1px #334155;
  overflow: hidden;
}

.prev-mobile-notch {
  width: 72px;
  height: 13px;
  background: #1e293b;
  border-radius: 0 0 10px 10px;
  margin: 0 auto 8px;
  display: block;
}

.prev-mobile-screen {
  padding: 4px 10px 16px;
}

/* Mobile card */
.prev-mob-card {
  background: #fff;
  border: 1px solid #dde3eb;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .09);
}

.prev-mob-topbar {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 9px 5px;
  border-bottom: 1px solid #f1f5f9;
  background: #fafbfc;
}

.prev-mob-logo {
  width: 14px;
  height: 14px;
  background: linear-gradient(135deg, #1d4ed8, #7c3aed);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

.prev-mob-site {
  font-size: 8.5px;
  font-weight: 700;
  color: #0f172a;
}

.prev-mob-url {
  font-size: 7.5px;
  color: #94a3b8;
  margin-left: auto;
}

.prev-mob-body {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding: 8px 9px 7px;
}

.prev-mob-text {
  flex: 1;
  min-width: 0;
}

.prev-mob-cat-tag {
  font-size: 7px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: #162c6b;
  margin-bottom: 3px;
}

.prev-mob-hl {
  font-size: 9px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.3;
  margin-bottom: 3px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.prev-mob-sum {
  font-size: 8px;
  color: #64748b;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.prev-mob-thumb {
  width: 58px;
  height: 52px;
  border-radius: 5px;
  background: #f1f5f9;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #cbd5e1;
}

/* Mobile footer */
.prev-mob-footer {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 9px 7px;
  border-top: 1px solid #f1f5f9;
  background: #fafbfc;
}

.prev-mob-av {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, #162c6b, #7c3aed);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 6px;
  font-weight: 700;
  color: #fff;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}

.prev-mob-aname {
  font-size: 8px;
  font-weight: 600;
  color: #1e293b;
}

.prev-mob-dot {
  font-size: 7px;
  color: #cbd5e1;
}

.prev-mob-time {
  font-size: 7.5px;
  color: #94a3b8;
}

/* ── Media Button ─────────────────────────────────────────── */
.media-post-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0px 8px !important;
  padding: 10px 16px;
  border-radius: 9px;
  background: #ffffff00 !important;
  border: 1px solid #ffffff38 !important;
  width: 210px;
  color: #fff !important;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.22s ease;
  letter-spacing: 0.01em;
}

.media-post-btn svg {
  width: 16px;
  height: 16px;
  stroke-width: 2;
  flex-shrink: 0;
}

.media-post-btn:hover {
  background: white !important;
  border-color: rgba(129, 140, 248, 0.6);
  color: black !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.25);
}

/* ── Media Hover Submenu ──────────────────────────────────── */
.media-btn-wrap {
  position: relative;
  margin: 0 10px -1px;
}

.media-btn-wrap .media-post-btn {
  margin: 0;
  width: 100%;
  box-sizing: border-box;
}

.media-dropdown {
  display: none;
  position: absolute;
  left: 0px;
  top: calc(100% + -6px);
  width: 100%;
  background: #fff;
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 10px;
  overflow: hidden;
  z-index: 999;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  animation: dropFade 0.18s ease;
}

@keyframes dropFade {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.media-btn-wrap:hover .media-dropdown {
  display: block;
}

.media-dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  color: #94a3b8 !important;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.media-dropdown a:last-child {
  border-bottom: none;
}

.media-dropdown a:hover {
  background: rgba(99, 102, 241, 0.12);
  color: #e0e7ff;
}

.media-dropdown a svg {
  width: 15px;
  height: 15px;
  stroke-width: 2;
  flex-shrink: 0;
  color: #6366f1;
}

/* ── Media Gallery Page ───────────────────────────────────── */
.media-gallery-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: #fff;
  backdrop-filter: blur(4px);
  flex-direction: column;
}

.media-gallery-overlay.active {
  display: flex;
}

.gallery-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: #03297b;
  flex-shrink: 0;
}

.gallery-header h2 {
  font-size: 22px;
  color: #e2e8f0;
  margin: 0;
}

.gallery-header-tabs {
  display: flex;
  gap: 8px;
}

.gallery-tab {
  padding: 7px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid rgba(99, 102, 241, 0.3);
  background: transparent;
  color: #94a3b8;
  transition: all 0.18s;
}

.gallery-tab.active,
.gallery-tab:hover {
  background: #4f46e5;
  border-color: #4f46e5;
  color: #fff;
}

.gallery-close-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #94a3b8;
  cursor: pointer;
  gap: 10px;
  padding: 7px 14px;
  font-size: 15px;
  line-height: 1;
  transition: all 0.15s;
  display: flex;
  align-items: center;
}

.gallery-close-btn:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.3);
}


/* stats bar hidden — count shown inline in header */
.gallery-stats {
  display: none;
}

/* count pill next to title */
.gallery-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.gallery-count-pill {
  display: inline-flex;
  align-items: center;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #a5b4fc;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 11px;
  border-radius: 20px;
  letter-spacing: 0.03em;
  font-family: inherit;
  transition: all 0.25s;
}

/* dropdown count badge */
.dropdown-count {
  margin-left: auto;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.28);
  color: #818cf8;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  min-width: 22px;
  text-align: center;
  transition: all 0.2s;
}

.media-dropdown a:hover .dropdown-count {
  background: rgba(99, 102, 241, 0.35);
  color: #e0e7ff;
}


.gallery-body {
  flex: 1;
  overflow-y: auto;
  padding: 28px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}

.gallery-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #1e293b;
  aspect-ratio: 4/3;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: transform 0.2s, box-shadow 0.2s;
  group: true;
}

.gallery-item:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 32px rgba(99, 102, 241, 0.3);
  border-color: rgba(99, 102, 241, 0.4);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-item-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.2s;
  display: flex;
  align-items: flex-end;
  padding: 12px;
}

.gallery-item:hover .gallery-item-overlay {
  opacity: 1;
}

.gallery-item-name {
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.video-play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  background: rgba(99, 102, 241, 0.85);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.video-play-icon svg {
  width: 18px;
  height: 18px;
  fill: white;
  margin-left: 2px;
}

.gallery-empty {
  text-align: center;
  padding: 80px 20px;
  color: #475569;
}

.gallery-empty svg {
  width: 56px;
  height: 56px;
  stroke: #334155;
  margin-bottom: 16px;
}

.gallery-empty p {
  font-size: 15px;
}

/* ── Lightbox ─────────────────────────────────────────────── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.96);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  outline: none !important;
  /* kill any blue focus ring */
  border: none !important;
}

.lightbox.active {
  display: flex;
}

/* Reset ALL focus outlines inside lightbox */
.lightbox *,
.lightbox *:focus,
.lightbox *:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

/* except buttons which should have subtle indicator */
.lightbox button:focus-visible {
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.5) !important;
}

.lightbox-close {
  position: fixed;
  top: 18px;
  right: 22px;
  z-index: 10002;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 8px;
  color: #f87171;
  cursor: pointer;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.15s;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 6px;
  outline: none !important;
}

.lightbox-close:hover {
  background: rgba(239, 68, 68, 0.25);
}

.lightbox-arrow {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10001;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  width: 52px;
  height: 52px;
  color: #e2e8f0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s;
  outline: none !important;
}

.lightbox-arrow:hover {
  background: rgba(99, 102, 241, 0.35);
  border-color: #6366f1;
  transform: translateY(-50%) scale(1.08);
}

.lightbox-arrow.prev {
  left: 24px;
}

.lightbox-arrow.next {
  right: 24px;
}

.lightbox-arrow svg {
  width: 22px;
  height: 22px;
  stroke-width: 2.5;
}

/* Image wrapper — vertically centered with room for bottom bar */
#lightboxContent {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 88vw;
  max-height: 72vh;
}

.lightbox-media {
  max-width: 88vw;
  max-height: 72vh;
  border-radius: 10px;
  object-fit: contain;
  display: block;
  box-shadow: 0 0 80px rgba(0, 0, 0, 0.6);
}

/* Bottom bar: counter + caption + prev/next buttons in ONE row */
.lightbox-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  width: 100%;
}

.lightbox-counter {
  color: #a5b4fc;
  font-size: 13px;
  font-weight: 700;
  background: rgba(99, 102, 241, 0.12);
  padding: 4px 18px;
  border-radius: 20px;
  border: 1px solid rgba(99, 102, 241, 0.25);
  letter-spacing: 0.04em;
}

.lightbox-caption {
  color: #64748b;
  font-size: 12.5px;
  max-width: 600px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lightbox-nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lightbox-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  color: #cbd5e1;
  cursor: pointer;
  padding: 9px 24px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: all 0.15s;
  font-family: inherit;
  outline: none !important;
}

.lightbox-btn:hover {
  background: rgba(99, 102, 241, 0.22);
  border-color: #6366f1;
  color: #e0e7ff;
  transform: translateY(-1px);
}

/* ── Delete action button ──────────────────── */
.art-action-btn--delete {
  background: rgba(239, 68, 68, 0.08) !important;
  border: 1px solid rgba(239, 68, 68, 0.2) !important;
  color: black !important;
  border-radius: 6px;
  margin-left: 9px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.16s;
  padding: 0;
}

.art-action-btn--delete:hover {
  background: rgba(239, 68, 68, 0.22);
  border-color: rgba(239, 68, 68, 0.5);
  color: #fca5a5;
  transform: scale(1.08);
}

/* ── Modal backdrop ────────────────────────── */
.del-modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
}

.del-modal-backdrop.active {
  display: flex;
}

/* ── Modal box ─────────────────────────────── */
.del-modal {
  background: #0f172a;
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 16px;
  padding: 36px 32px 28px;
  width: 100%;
  max-width: 420px;
  text-align: center;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.04);
  animation: modalPop 0.22s cubic-bezier(.34, 1.56, .64, 1);
}

@keyframes modalPop {
  from {
    opacity: 0;
    transform: scale(0.88) translateY(12px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* ── Modal icon ────────────────────────────── */
.del-modal__icon {
  width: 64px;
  height: 64px;
  background: rgba(239, 68, 68, 0.1);
  border: 1.5px solid rgba(239, 68, 68, 0.25);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  color: #f87171;
}

/* ── Modal text ────────────────────────────── */
.del-modal__title {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  color: #f1f5f9;
  margin: 0 0 12px;
}

.del-modal__msg {
  font-size: 14px;
  color: #94a3b8;
  line-height: 1.7;
  margin: 0 0 24px;
}

.del-modal__msg strong {
  color: #e2e8f0;
  display: block;
  margin: 6px 0 4px;
  font-size: 13.5px;
}

.del-modal__warn {
  font-size: 12px;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.08);
  padding: 3px 10px;
  border-radius: 6px;
  display: inline-block;
  margin-top: 4px;
}

/* ── Modal buttons ─────────────────────────── */
.del-modal__actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.del-modal__cancel {
  flex: 1;
  padding: 10px 0;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: #94a3b8;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}

.del-modal__cancel:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
}

.del-modal__confirm {
  flex: 1;
  padding: 10px 0;
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: 10px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  text-decoration: none;
}

.del-modal__confirm:hover {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.35);
  transform: translateY(-1px);
}

.social-platform-bar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 14px 20px 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.soc-plat-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}

.soc-plat-btn:hover {
  background: rgba(99, 102, 241, 0.1);
  border-color: #6366f1;
  color: #a5b4fc;
}

.soc-plat-btn.active {
  background: rgba(99, 102, 241, 0.15);
  border-color: #6366f1;
  color: #a5b4fc;
}

.social-handle-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.social-handle-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.social-handle-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.soc-handle-btn {
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.12s;
  font-family: inherit;
}

.soc-handle-btn:hover,
.soc-handle-btn.active {
  background: rgba(99, 102, 241, 0.12);
  border-color: #6366f1;
  color: #a5b4fc;
}

/* table */
.social-table-wrap {
  overflow-x: auto;
  padding: 16px 20px;
}

.social-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.social-table th {
  padding: 8px 12px;
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.social-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
}

.social-table tr:hover td {
  background: rgba(99, 102, 241, 0.04);
}

.soc-plat-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 4px;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: capitalize;
}

.soc-handle-chip {
  font-size: 11px;
  color: #a5b4fc;
  font-weight: 600;
}

.soc-preview-cell {
  max-width: 220px;
}

.soc-preview-text {
  font-size: 11px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

.soc-date-cell {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}

.soc-reach-cell {
  font-size: 12px;
  font-weight: 700;
  color: #34d399;
}

.soc-status-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: capitalize;
}

.soc-status-published {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.soc-status-scheduled {
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
}

.soc-status-pending {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.soc-status-archived {
  background: rgba(148, 163, 184, 0.12);
  color: #64748b;
}

.soc-actions {
  display: flex;
  gap: 4px;
}

.soc-action-btn {
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.12s;
}

.soc-action-btn:hover {
  background: rgba(99, 102, 241, 0.1);
  border-color: #6366f1;
}

.social-table-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 60px;
  color: var(--muted);
}

.social-table-empty p {
  font-size: 13px;
}

/* ═══════════════════════════════════════════════
   make_post.css
   Font   : Poppins
   Colors : Blue · White · Grey  (black = text only, red = important/danger)
   Save to: newsapp/static/admin/css/make_post.css
═══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

/* ── CSS Variables ── */
:root {
  --mp-blue: #162c6b;
  --mp-blue-mid: #3b82f6;
  --mp-blue-light: #93c5fd;
  --mp-blue-ghost: #dbeafe;
  --mp-blue-tint: rgba(37, 99, 235, 0.10);
  --mp-blue-tint2: rgba(37, 99, 235, 0.06);

  --mp-grey-900: #111827;
  --mp-grey-800: #1f2937;
  --mp-grey-700: #374151;
  --mp-grey-500: #6b7280;
  --mp-grey-400: #9ca3af;
  --mp-grey-200: #e5e7eb;
  --mp-grey-100: #f3f4f6;

  --mp-white: #ffffff;
  --mp-text: #111827;

  /* Red — danger/important only */
  --mp-red: #dc2626;
  --mp-red-bg: rgba(220, 38, 38, 0.08);
  --mp-red-border: rgba(220, 38, 38, 0.30);

  /* Green — success only */
  --mp-green: #16a34a;
  --mp-green-bg: rgba(22, 163, 74, 0.08);
  --mp-green-border: rgba(22, 163, 74, 0.25);

  --mp-font: 'Poppins', sans-serif;
  --mp-radius: 10px;
  --mp-radius-sm: 6px;
  --mp-radius-lg: 14px;
}

/* ── Apply Poppins to entire social overlay ── */
#socialMediaOverlay,
#socialMediaOverlay * {
  font-family: var(--mp-font) !important;
}

/* ══════════════════════════════════════════════
   OVERLAY HEADER
══════════════════════════════════════════════ */
#socialMediaOverlay .gallery-header {
  background: #162c6b !important;
  border-bottom: 1px solid #f0f0f0 !important;
}

#socialMediaOverlay .gallery-header h2 {
  color: var(--mp-white);
  font-weight: 700;
  font-size: 16px;
}

#socialMediaOverlay .gallery-count-pill {
  background: var(--mp-blue-tint);
  color: var(--mp-blue-mid);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 20px;
  padding: 2px 10px;
  font-size: 11px;
  font-weight: 600;
}

#socialMediaOverlay .gallery-tab {
  background: transparent;
  border: 1px solid var(--mp-grey-700);
  color: var(--mp-grey-400);
  border-radius: var(--mp-radius-sm);
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all .2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

#socialMediaOverlay .gallery-tab.active,
#socialMediaOverlay .gallery-tab:hover {
  background: var(--mp-blue-tint);
  border-color: var(--mp-blue-mid);
  color: var(--mp-blue-mid);
}

/* Close button — red on hover (important action) */
#socialMediaOverlay .gallery-close-btn {
  background: var(--mp-grey-800);
  border: 1px solid var(--mp-grey-700);
  color: var(--mp-grey-400);
  border-radius: var(--mp-radius-sm);
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all .2s;
}

#socialMediaOverlay .gallery-close-btn:hover {
  border-color: var(--mp-red);
  color: var(--mp-red);
  background: var(--mp-red-bg);
}

/* ══════════════════════════════════════════════
   ALL POSTS PAGE
══════════════════════════════════════════════ */
.social-page {
  background: var(--mp-grey-900);
  min-height: 100%;
}

.social-platform-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 16px 24px;
  border-bottom: 1px solid var(--mp-grey-700);
  background: var(--mp-grey-800);
}

.soc-plat-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid var(--mp-grey-700);
  color: var(--mp-grey-400);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all .2s;
}

.soc-plat-btn:hover {
  border-color: var(--mp-blue-mid);
  color: var(--mp-blue-mid);
  background: var(--mp-blue-tint2);
}

.soc-plat-btn.active {
  background: var(--mp-blue-tint);
  border-color: var(--mp-blue-mid);
  color: var(--mp-blue-mid);
  font-weight: 600;
}

.social-handle-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--mp-grey-700);
  background: var(--mp-grey-900);
  flex-wrap: wrap;
}

.social-handle-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--mp-grey-500);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.social-handle-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.soc-handle-btn {
  background: transparent;
  border: 1px solid var(--mp-grey-700);
  color: var(--mp-grey-400);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all .2s;
}

.soc-handle-btn.active,
.soc-handle-btn:hover {
  background: var(--mp-blue-tint);
  border-color: var(--mp-blue-mid);
  color: var(--mp-blue-mid);
}

/* Table */
.social-table-wrap {
  padding: 20px 24px;
  overflow-x: auto;
}

.social-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.social-table thead tr {
  border-bottom: 1px solid var(--mp-grey-700);
}

.social-table thead th {
  padding: 10px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--mp-grey-500);
  text-transform: uppercase;
  letter-spacing: .06em;
  white-space: nowrap;
}

.social-table tbody tr {
  border-bottom: 1px solid rgba(55, 65, 81, .4);
  transition: background .15s;
}

.social-table tbody tr:last-child {
  border-bottom: none;
}

.social-table tbody tr:hover {
  background: var(--mp-grey-800);
}

.social-table tbody td {
  padding: 12px 14px;
  color: var(--mp-grey-200);
  vertical-align: middle;
}

.soc-plat-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  color: var(--mp-white);
  text-transform: capitalize;
}

.soc-handle-chip {
  font-size: 11px;
  color: var(--mp-blue-light);
  background: var(--mp-blue-tint);
  border: 1px solid rgba(59, 130, 246, .2);
  padding: 2px 8px;
  border-radius: var(--mp-radius-sm);
}

.soc-preview-cell {
  max-width: 220px;
}

.soc-preview-text {
  font-size: 12px;
  color: var(--mp-grey-400);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.soc-date-cell {
  font-size: 12px;
  color: var(--mp-grey-500);
  white-space: nowrap;
}

.soc-reach-cell {
  font-size: 12px;
  color: var(--mp-grey-400);
}

/* Status badges */
.soc-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: capitalize;
}

.soc-status-published {
  background: var(--mp-green-bg);
  color: var(--mp-green);
  border: 1px solid var(--mp-green-border);
}

.soc-status-scheduled {
  background: var(--mp-blue-tint);
  color: var(--mp-blue-mid);
  border: 1px solid rgba(59, 130, 246, .25);
}

/* yellow/amber for pending — needs attention */
.soc-status-pending {
  background: rgba(234, 179, 8, .08);
  color: #b45309;
  border: 1px solid rgba(234, 179, 8, .25);
}

/* red for archived — important state */
.soc-status-archived {
  background: var(--mp-red-bg);
  color: var(--mp-red);
  border: 1px solid var(--mp-red-border);
}

/* Table action buttons */
.soc-actions {
  display: flex;
  gap: 6px;
}

.soc-action-btn {
  width: 30px;
  height: 30px;
  border-radius: var(--mp-radius-sm);
  border: 1px solid var(--mp-grey-700);
  background: transparent;
  color: var(--mp-grey-500);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s;
}

.soc-action-btn:hover {
  border-color: var(--mp-blue-mid);
  color: var(--mp-blue-mid);
  background: var(--mp-blue-tint2);
}

/* Archive = destructive = red */
.soc-arch-btn:hover {
  border-color: var(--mp-red) !important;
  color: var(--mp-red) !important;
  background: var(--mp-red-bg) !important;
}

/* Empty state */
.social-table-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 40px 24px;
  color: var(--mp-grey-500);
  font-size: 13px;
}

/* ══════════════════════════════════════════════
   MAKE A POST
══════════════════════════════════════════════ */
.mp2-wrap {
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  background: #fff !important;
  min-height: 100%;
}

.mp2-step {
  border: 1px solid #ccc;
  border-radius: var(--mp-radius-lg);
  padding: 22px 24px;
  background: #f1f5f9 !important;
  margin-bottom: 16px;
}

.mp2-step-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.mp2-step-num {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--mp-blue);
  color: var(--mp-white);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mp2-step-title {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

.mp2-step-sub {
  font-size: 12px;
  color: var(--mp-grey-500);
  margin-top: 2px;
}

/* Platform cards */
.mp2-platform-grid {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.mp2-plat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  background: #1118272e;
  border: 1px solid var(--mp-grey-700);
  border-radius: var(--mp-radius);
  padding: 16px 14px;
  cursor: pointer;
  transition: border-color .2s, background .2s, box-shadow .2s;
  position: relative;
  min-width: 100px;
}

.mp2-plat-card:hover {
  border-color: var(--mp-blue-mid);
  background: var(--mp-blue-tint2);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .08);
}

.mp2-plat-card.selected {
  border-color: var(--mp-blue-mid);
  background: var(--mp-blue-tint);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .12);
}

.mp2-plat-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--mp-radius);
  display: flex;
  align-items: center;
  justify-content: center;
}

.mp2-plat-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--mp-white);
}

.mp2-plat-size {
  font-size: 10px;
  color: var(--mp-grey-500);
}

.mp2-plat-check {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--mp-blue);
  color: var(--mp-white);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .15s;
}

.mp2-plat-card.selected .mp2-plat-check {
  opacity: 1;
}

.mp2-plat-info {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--mp-grey-500);
  padding: 10px 14px;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: var(--mp-radius-sm);
  transition: all .2s;
}

.mp2-plat-info.active {
  color: var(--mp-green);
  border-color: var(--mp-green-border);
  background: var(--mp-green-bg);
}

/* Controls */
.mp2-controls {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mp2-upload-area {
  border: 1.5px dashed var(--mp-grey-700);
  border-radius: var(--mp-radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  background: #fff;
}

.mp2-upload-area:hover {
  border-color: var(--mp-blue-mid);
  background: var(--mp-blue-tint2);
}

.mp2-upload-area.has-image {
  border-style: solid;
  border-color: var(--mp-green);
  background: var(--mp-green-bg);
}

.mp2-upload-text {
  font-size: 12px;
  font-weight: 600;
  color: var(--mp-grey-500);
}

.mp2-upload-hint {
  font-size: 10px;
  color: var(--mp-grey-500);
}

.mp2-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mp2-field-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--mp-grey-500);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.mp2-input {
  background: #fff;
  border: 1px solid var(--mp-grey-700);
  color: var(--mp-white);
  border-radius: var(--mp-radius-sm);
  padding: 9px 12px;
  font-size: 13px;
  font-family: var(--mp-font);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  width: 100%;
  box-sizing: border-box;
}

.mp2-input::placeholder {
  color: var(--mp-grey-500);
}

.mp2-input:focus {
  border-color: var(--mp-blue-mid);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .12);
}

.mp2-textarea {
  resize: vertical;
  min-height: 64px;
}

.mp2-select {
  cursor: pointer;
}

.mp2-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.mp2-theme-row {
  display: flex;
  gap: 8px;
}

.mp2-theme-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: var(--mp-grey-900);
  border: 1px solid var(--mp-grey-700);
  color: var(--mp-grey-500);
  border-radius: var(--mp-radius-sm);
  padding: 9px 14px;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--mp-font);
  cursor: pointer;
  transition: all .2s;
}

.mp2-theme-btn:hover {
  border-color: var(--mp-blue-mid);
  color: var(--mp-white);
}

.mp2-theme-btn.active {
  background: var(--mp-blue);
  border-color: var(--mp-blue);
  color: var(--mp-white);
}

.mp2-accent-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.mp2-accent-dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid transparent !important;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
  outline: none;
  padding: 0;
}

.mp2-accent-dot:hover {
  transform: scale(1.15);
}

.mp2-accent-dot.active {
  box-shadow: 0 0 0 2px var(--mp-grey-800), 0 0 0 4px currentColor;
  transform: scale(1.1);
}

/* Download buttons */
.mp2-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--mp-blue);
  color: var(--mp-white);
  border: none;
  border-radius: var(--mp-radius-sm);
  padding: 10px 18px;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--mp-font);
  cursor: pointer;
  transition: background .2s, transform .2s, box-shadow .2s;
  box-shadow: 0 4px 12px rgba(37, 99, 235, .3);
  white-space: nowrap;
}

.mp2-download-btn:hover:not(:disabled) {
  background: var(--mp-blue-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(37, 99, 235, .35);
}

.mp2-download-btn:disabled {
  opacity: .4;
  cursor: not-allowed;
  box-shadow: none;
}

.mp2-download-alt {
  background: var(--mp-grey-900);
  border: 1px solid var(--mp-grey-700);
  color: var(--mp-grey-200);
  box-shadow: none;
  margin-left: 8px;
}

.mp2-download-alt:hover:not(:disabled) {
  background: var(--mp-grey-800);
  border-color: var(--mp-blue-mid);
  transform: translateY(-1px);
  box-shadow: none;
}

/* Preview */
.mp2-preview-outer {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.mp2-preview-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 48px 24px;
  border: 1.5px dashed var(--mp-grey-700);
  border-radius: var(--mp-radius);
  width: 100%;
  background: #fff;
  box-sizing: border-box;
}

.mp2-preview-placeholder p {
  font-size: 13px;
  color: var(--mp-grey-500);
  text-align: center;
  max-width: 320px;
  margin: 0;
}

.mp2-preview-scaler {
  width: 100%;
  display: flex;
  justify-content: center;
}

/* Post card */
.mp2-post-card {
  position: relative;
  overflow: hidden;
  background: var(--mp-grey-200);
  transform-origin: top center;
  box-shadow: 0 16px 48px rgba(0, 0, 0, .35), 0 0 0 1px var(--mp-grey-700);
}

.mp2-post-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-color: var(--mp-grey-800);
}

.mp2-post-grad {
  position: absolute;
  inset: 0;
}

.mp2-post-grad.light {
  background: linear-gradient(to top,
      rgba(255, 255, 255, .96) 38%,
      rgba(255, 255, 255, .5) 68%,
      transparent 100%);
}

.mp2-post-grad.dark {
  background: linear-gradient(to top,
      rgba(17, 24, 39, .97) 38%,
      rgba(17, 24, 39, .55) 68%,
      transparent 100%);
}

.mp2-post-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 5%;
}

.mp2-logo-badge {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(6px);
  padding: 6px 10px;
  border-radius: var(--mp-radius-sm);
  border: 1px solid var(--mp-grey-200);
}

.mp2-logo-dots {
  display: flex;
  gap: 3px;
}

/* Category badge — blue (important brand element) */
.mp2-cat-badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 4px;
  color: var(--mp-white);
  background: var(--mp-blue);
  font-family: var(--mp-font);
}

.mp2-post-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0 5% 5%;
}

/* Accent line — blue */
.mp2-accent-line {
  height: 3px;
  width: 40px;
  background: var(--mp-blue);
  border-radius: 2px;
  margin-bottom: 10px;
}

/* Text in the post card — dark grey (not pure black) */
.mp2-post-headline {
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -.3px;
  margin-bottom: 8px;
  color: var(--mp-text);
  font-family: var(--mp-font);
}

.mp2-post-desc {
  line-height: 1.5;
  color: var(--mp-grey-500);
  margin-bottom: 12px;
  font-family: var(--mp-font);
}

.mp2-post-footer {
  display: flex;
  justify-content: flex-end;
  color: var(--mp-grey-400);
  font-family: var(--mp-font);
}

/* Responsive */
@media (max-width: 640px) {
  .mp2-wrap {
    padding: 14px;
  }

  .mp2-step {
    padding: 16px;
  }

  .mp2-platform-grid {
    gap: 8px;
  }

  .mp2-plat-card {
    min-width: 80px;
    padding: 12px 10px;
  }

  .mp2-field-row {
    grid-template-columns: 1fr;
  }

  .mp2-download-alt {
    margin-left: 0;
    margin-top: 8px;
  }
}

.form-logo-box img {
  height: 33px;
  width: 232px;
  margin-left: 180px;
}

/* ══════════════════════════════
       FULL PAGE SPLIT LAYOUT
    ══════════════════════════════ */
.login-wrap {
  display: grid;
  grid-template-columns: 1fr 480px;
  min-height: 100vh;
}

/* ══════════════════════════════
       LEFT — Slideshow Panel
    ══════════════════════════════ */
.login-left {
  position: relative;
  overflow: hidden;
  background: var(--blue);
}

/* Slide images */
.slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
}

.slide.active {
  opacity: 1;
}

/* Blue overlay gradient */
.slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
      rgba(15, 45, 110, 0.75) 0%,
      rgba(37, 88, 196, 0.55) 50%,
      rgba(15, 45, 110, 0.80) 100%);
}

/* Slide 1 — newsroom */
.slide-1 {
  background-image: url('https://images.unsplash.com/photo-1504711434969-e33886168f5c?w=1400&q=80');
}

/* Slide 2 — journalism */
.slide-2 {
  background-image: url('https://images.unsplash.com/photo-1585829365295-ab7cd400c167?w=1400&q=80');
}

/* Slide 3 — press/printing */
.slide-3 {
  background-image: url('https://images.unsplash.com/photo-1495020689067-958852a7765e?w=1400&q=80');
}

/* Slide 4 — digital media */
.slide-4 {
  background-image: url('https://images.unsplash.com/photo-1563986768609-322da13575f3?w=1400&q=80');
}

/* Slide 5 — broadcast */
.slide-5 {
  background-image: url('https://images.unsplash.com/photo-1610484826967-09c5720778c7?w=1400&q=80');
}

/* Slide content overlay */
.slide-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 48px;
  z-index: 2;
  background: linear-gradient(to top, rgba(15, 45, 110, 0.95) 0%, transparent 100%);
}

.slide-quote {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  line-height: 1.4;
  margin-bottom: 10px;
  opacity: 0;
  transform: translateY(16px);
  transition: all 0.6s ease 0.4s;
}

.slide.active .slide-quote {
  opacity: 1;
  transform: translateY(0);
}

.slide-sub {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.65);
  font-weight: 400;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.6s ease 0.6s;
}

.slide.active .slide-sub {
  opacity: 1;
  transform: translateY(0);
}

/* Dot indicators */
.slide-dots {
  position: absolute;
  bottom: 24px;
  right: 48px;
  display: flex;
  gap: 7px;
  z-index: 3;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: all 0.3s;
}

.dot.active {
  background: #fff;
  width: 22px;
  border-radius: 4px;
}

/* Top logo on left panel */
.left-logo {
  position: absolute;
  top: 36px;
  left: 48px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.2s forwards;
}

.left-logo img {
  margin-left: 242px;
  height: 44px;
  filter: brightness(0) invert(1);
}

.left-logo-fallback {
  display: flex;
  align-items: center;
  gap: 10px;
}

.left-logo-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #ffffff00;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  box-shadow: 0 4px 16px rgb(216 1 0 / 0%);
}

.left-logo-text {
  display: flex;
  flex-direction: column;
}

.left-logo-name {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.3px;
  line-height: 1;
}

.left-logo-tagline {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 400;
  letter-spacing: 0.3px;
  margin-top: 2px;
}

/* Floating badge top right of left panel */
.cms-badge {
  position: absolute;
  top: 40px;
  right: 48px;
  z-index: 3;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.5px;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.4s forwards;
}

/* ══════════════════════════════
       RIGHT — Login Form Panel
    ══════════════════════════════ */
.login-right {
  background: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 52px;
  position: relative;
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.15);
}

/* Top decorative bar */
.login-right::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--red) 0%, #ff6b6b 50%, var(--red) 100%);
}

/* Right panel logo */
.form-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 36px;
  opacity: 0;
  animation: fadeUp 0.7s ease 0.1s forwards;
}

.form-logo-box {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  box-shadow: 0 4px 14px #fff;
  flex-shrink: 0;
}

.form-logo-name {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.3px;
  line-height: 1;
}

.form-logo-name span {
  color: var(--red);
}

.form-logo-tagline {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
  font-weight: 400;
}

/* Headings */
.form-heading {
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
  line-height: 1.2;
  margin-bottom: 6px;
  opacity: 0;
  animation: fadeUp 0.7s ease 0.2s forwards;
}

.form-subhead {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 32px;
  font-weight: 400;
  opacity: 0;
  animation: fadeUp 0.7s ease 0.3s forwards;
}

/* Error message */
.login-error {
  background: #fff1f1;
  border: 1.5px solid #fca5a5;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  color: var(--red);
  font-weight: 500;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: shake 0.4s ease;
}

@keyframes shake {

  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-6px);
  }

  75% {
    transform: translateX(6px);
  }
}

/* Form fields */
.form-group {
  margin-bottom: 18px;
  opacity: 0;
  animation: fadeUp 0.7s ease forwards;
}

.form-group:nth-child(1) {
  animation-delay: 0.35s;
}

.form-group:nth-child(2) {
  animation-delay: 0.45s;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
  margin-bottom: 7px;
}

.input-wrap {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #cbd5e1;
  pointer-events: none;
  transition: color 0.2s;
}

.input-wrap:focus-within .input-icon {
  color: var(--red);
}

.form-input {
  width: 100%;
  padding: 13px 14px 13px 42px;
  border: 2px solid var(--border);
  border-radius: 12px;
  font-size: 14px;
  font-family: 'Poppins', sans-serif;
  color: var(--text);
  background: #f8fafc;
  outline: none;
  transition: all 0.2s;
}

.form-input:focus {
  border-color: var(--red);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(216, 1, 0, 0.08);
}

.form-input::placeholder {
  color: #c0cad8;
  font-size: 13px;
}

/* Password toggle */
.pass-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #cbd5e1 !important;
  cursor: pointer;
  transition: color 0.2s;
  background: none !important;
  border: none;
  padding: 0;
  display: flex;
  align-items: center;
}

.pass-toggle:hover {
  color: var(--red);
}

/* Submit button */
.btn-login {
  width: 100%;
  padding: 14px;
  background: var(--red) !important;
  color: #fff !important;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 16px rgba(216, 1, 0, 0.30);
  margin-top: 8px;
  position: relative;
  overflow: hidden;
  opacity: 0;
  animation: fadeUp 0.7s ease 0.55s forwards;
}

.btn-login::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  transform: translateX(-100%);
  transition: transform 0.5s;
}

.btn-login:hover {
  background: var(--red-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(216, 1, 0, 0.4);
}

.btn-login:hover::after {
  transform: translateX(100%);
}

.btn-login:active {
  transform: translateY(0);
}

/* Disclaimer */
.login-disclaimer {
  margin-top: 28px;
  padding: 14px 16px;
  background: #f8fafc;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
  text-align: center;
  opacity: 0;
  animation: fadeUp 0.7s ease 0.65s forwards;
}

.login-disclaimer svg {
  display: inline-block;
  vertical-align: middle;
  margin-right: 4px;
  color: var(--red);
}

.login-disclaimer strong {
  color: var(--text);
}

/* Footer */
.login-footer {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 11px;
  color: #c8d0dc;
  opacity: 0;
  animation: fadeUp 0.7s ease 0.8s forwards;
}

/* Animations */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (max-width: 900px) {
  .login-wrap {
    grid-template-columns: 1fr;
  }

  .login-left {
    display: none;
  }

  .login-right {
    padding: 40px 28px;
  }
}

/* ── Permission Management – permission.css ── */

/* ── Page Header ── */
.perm-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 14px;
}

.perm-breadcrumb {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 6px;
  font-family: 'poppins';
}

.perm-breadcrumb span {
  color: var(--accent2);
}

.perm-title {
  font-size: 22px;
  font-weight: 700;
  color: #1d4ed8;
  font-family: 'poppins';
}

.perm-subtitle {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
  font-family: 'poppins';
}

/* ── Add Button ── */
.btn-perm-add {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #fff !important;
  border: none;
  border-radius: 10px;
  padding: 11px 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'poppins';
  transition: all 0.2s;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.btn-perm-add:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
}

/* ── Stats Row ── */
.perm-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

@media (max-width: 768px) {
  .perm-stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

.perm-stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: border 0.2s;
}

.perm-stat-card:hover {
  border-color: var(--accent2);
}

.perm-stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.perm-stat-icon svg {
  width: 18px;
  height: 18px;
}

.perm-stat-icon.blue {
  background: rgba(37, 99, 235, 0.15);
  color: var(--accent2);
}

.perm-stat-icon.green {
  background: rgba(34, 197, 94, 0.12);
  color: var(--green);
}

.perm-stat-icon.yellow {
  background: rgba(245, 158, 11, 0.12);
  color: var(--yellow);
}

.perm-stat-icon.red {
  background: rgba(239, 68, 68, 0.12);
  color: var(--red);
}

.perm-stat-num {
  font-size: 22px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text);
}

.perm-stat-label {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
  font-family: 'poppins';
}

/* ── Table Card ── */
.perm-table-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

.perm-table-toolbar {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
}

.perm-toolbar-title {
  font-size: 14px;
  font-weight: 600;
  flex: 1;
  font-family: 'poppins';
  color: var(--text);
}

.perm-toolbar-title span {
  color: var(--muted);
  font-weight: 400;
  font-size: 12px;
}

.perm-filter-select {
  background: var(--card2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 7px;
  padding: 7px 12px;
  font-size: 12px;
  font-family: 'poppins';
  outline: none;
  cursor: pointer;
}

.perm-bulk-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 7px;
  padding: 7px 13px;
  font-size: 12px;
  font-family: 'poppins';
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.perm-bulk-btn:hover {
  border-color: var(--red);
  color: var(--red);
}

/* ── Table ── */
.perm-table-wrap {
  overflow-x: auto;
}

.perm-table {
  width: 100%;
  border-collapse: collapse;
}

.perm-table thead tr {
  border-bottom: 1px solid var(--border);
}

.perm-table thead th {
  padding: 12px 18px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
  font-family: 'poppins';
}

.perm-table thead th:first-child {
  padding-left: 20px;
}

.perm-table tbody tr {
  border-bottom: 1px solid rgba(31, 45, 69, 0.5);
  transition: background 0.15s;
}

.perm-table tbody tr:last-child {
  border-bottom: none;
}

.perm-table tbody tr:hover {
  background: var(--card2);
}

.perm-table tbody td {
  padding: 14px 18px;
  font-size: 13px;
  vertical-align: middle;
  font-family: 'poppins';
  color: var(--text);
}

.perm-table tbody td:first-child {
  padding-left: 20px;
}

/* ── Cell Styles ── */
.perm-name-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  color: #93c5fd;
  background: rgba(37, 99, 235, 0.1);
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(59, 130, 246, 0.2);
  display: inline-block;
}

.perm-desc {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.perm-category-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: 'poppins';
}

.perm-cat-content {
  background: rgba(37, 99, 235, 0.15);
  color: #60a5fa;
}

.perm-cat-finance {
  background: rgba(34, 197, 94, 0.12);
  color: #4ade80;
}

.perm-cat-admin {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
}

.perm-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
}

.perm-status-dot.active {
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
}

.perm-status-dot.inactive {
  background: var(--muted);
}

.perm-assigned-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--text);
  background: var(--card2);
  padding: 2px 9px;
  border-radius: 5px;
  border: 1px solid var(--border);
}

/* ── Action Buttons ── */
.perm-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.perm-btn-icon {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  color: var(--muted);
}

.perm-btn-icon svg {
  width: 14px;
  height: 14px;
}

.perm-btn-icon.edit:hover {
  background: rgba(59, 130, 246, 0.15);
  border-color: var(--accent2);
  color: var(--accent2);
}

.perm-btn-icon.delete:hover {
  background: rgba(239, 68, 68, 0.12);
  border-color: var(--red);
  color: var(--red);
}

.perm-btn-icon.view:hover {
  background: rgba(34, 197, 94, 0.1);
  border-color: var(--green);
  color: var(--green);
}

/* ── Checkbox ── */
.perm-cb {
  width: 15px;
  height: 15px;
  accent-color: var(--accent);
  cursor: pointer;
}

/* ── Pagination ── */
.perm-pagination {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
}

.perm-page-info {
  font-size: 12px;
  color: var(--muted);
  font-family: 'poppins';
}

.perm-page-btns {
  display: flex;
  gap: 6px;
}

.perm-page-btn {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  font-family: 'poppins';
}

.perm-page-btn:hover,
.perm-page-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ── Modal ── */
.perm-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  z-index: 100;
  align-items: center;
  justify-content: center;
}

.perm-modal-overlay.open {
  display: flex;
}

.perm-modal {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  width: 420px;
  max-width: 95vw;
  animation: permSlideUp 0.25s ease;
}

@keyframes permSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.perm-modal-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text);
  font-family: 'poppins';
}

.perm-modal-sub {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 22px;
  font-family: 'poppins';
}

.perm-form-group {
  margin-bottom: 16px;
}

.perm-form-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  display: block;
  margin-bottom: 7px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: 'poppins';
}

.perm-form-input,
.perm-form-select {
  width: 100%;
  background: var(--card2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 10px 13px;
  font-size: 13px;
  font-family: 'poppins';
  outline: none;
  transition: border 0.2s;
}

.perm-form-input:focus,
.perm-form-select:focus {
  border-color: var(--accent2);
}

.perm-modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 22px;
  justify-content: flex-end;
}

.perm-btn-cancel {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 8px;
  padding: 9px 18px;
  font-size: 13px;
  font-family: 'poppins';
  cursor: pointer;
  transition: all 0.2s;
}

.perm-btn-cancel:hover {
  border-color: var(--text);
  color: var(--text);
}

.perm-btn-save {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 9px 20px;
  font-size: 13px;
  font-weight: 600;
  font-family: 'poppins';
  cursor: pointer;
  transition: background 0.2s;
}

.perm-btn-save:hover {
  background: #1d4ed8;
}

/* ── Delete Modal ── */
.perm-delete-icon-wrap {
  width: 48px;
  height: 48px;
  background: rgba(239, 68, 68, 0.12);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.perm-delete-icon-wrap svg {
  width: 22px;
  height: 22px;
  color: var(--red);
}

.perm-btn-delete-confirm {
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 9px 20px;
  font-size: 13px;
  font-weight: 600;
  font-family: 'poppins';
  cursor: pointer;
}

/* ── Toast ── */
.perm-toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 13px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-family: 'poppins';
  color: var(--text);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  z-index: 200;
  transform: translateY(80px);
  opacity: 0;
  transition: all 0.3s ease;
}

.perm-toast.show {
  transform: translateY(0);
  opacity: 1;
}

.perm-toast-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
}

.perm-toast-dot.red {
  background: var(--red);
}

/* ═══════════════════════════════════════════════════════════
   inbox_notif.css  —  Shared styles for Inbox & Notification
   News4Bharat Admin  |  White-light theme
═══════════════════════════════════════════════════════════ */

/* ── Root tokens ── */
:root {
  --white: #ffffff;
  --bg: #f5f6fa;
  --surface: #ffffff;
  --surface2: #f0f2f8;
  --border: #e4e7ef;
  --border2: #d0d5e8;
  --text: #111827;
  --text2: #4b5563;
  --text3: #9ca3af;
  --accent: #1950DF;
  --accent-lt: rgba(25, 80, 223, .08);
  --red: #FA2E1A;
  --red-lt: rgba(250, 46, 26, .08);
  --yellow: #FEAD17;
  --yellow-lt: rgba(254, 173, 23, .1);
  --green: #0FBC87;
  --green-lt: rgba(15, 188, 135, .1);
  --grey: #6b7280;
  --shadow: 0 2px 12px rgba(0, 0, 0, .06);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, .1);
  --radius: 12px;
  --radius-sm: 8px;
}

a.quick-item {
  text-decoration: none;
  color: inherit;
  display: flex;
}

/* ── Page wrapper ── */
.in-page-wrap {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 64px);
  /* account for topbar */
  overflow: hidden;
  background: var(--bg);
  font-family: 'DM Sans', sans-serif;
}

/* ── Page header (breadcrumb + title) ── */
.in-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0px 19px 15px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  gap: 12px;
  flex-wrap: wrap;
}

.in-breadcrumb {
  font-size: 11.5px;
  color: var(--text3);
  margin-bottom: 3px;
}

.in-breadcrumb span {
  color: var(--accent);
  font-weight: 600;
}

.in-page-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.3px;
}

.in-page-sub {
  font-size: 12.5px;
  color: var(--text3);
  margin-top: 1px;
}

.in-header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* ── Main layout ── */
.in-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* ══════════════════════════════════════════
   INBOX — left sidebar (conversation list)
══════════════════════════════════════════ */
.in-sidebar {
  width: 300px;
  background: var(--white);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.in-search-wrap {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.in-search-icon {
  position: absolute;
  left: 257px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text3);
  pointer-events: none;
}

.in-search {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px 8px 32px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: var(--text);
  outline: none;
  transition: border-color .2s;
}

.in-search:focus {
  border-color: var(--accent);
  background: var(--white);
}

.in-sidebar-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px 4px;
}

.in-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .7px;
  text-transform: uppercase;
  color: var(--text3);
  padding: 10px 14px 4px;
}

.in-new-group-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-lt);
  border: none;
  border-radius: 6px;
  padding: 5px 10px;
  cursor: pointer;
  transition: background .15s;
  font-family: 'DM Sans', sans-serif;
}

.in-new-group-btn:hover {
  background: rgba(25, 80, 223, .15);
}

.conv-list {
  flex: 1;
  overflow-y: auto;
}

.conv-list::-webkit-scrollbar {
  width: 4px;
}

.conv-list::-webkit-scrollbar-thumb {
  background: var(--border2);
  border-radius: 4px;
}

.conv-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background .15s;
  border-bottom: 1px solid transparent;
  position: relative;
}

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

.conv-item.active {
  background: var(--accent-lt);
}

.conv-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent);
  border-radius: 0 2px 2px 0;
}

.conv-av {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
  position: relative;
}

.conv-av.group {
  border-radius: 10px;
  font-size: 12px;
}

.conv-online {
  position: absolute;
  bottom: 1px;
  right: 1px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  border: 2px solid var(--white);
}

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

.conv-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.conv-last {
  font-size: 12px;
  color: var(--text3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

.conv-item.unread .conv-name {
  color: #000;
}

.conv-item.unread .conv-last {
  color: var(--text2);
}

.conv-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.conv-time {
  font-size: 10.5px;
  color: var(--text3);
}

.conv-badge {
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}

/* ══════════════════════════════════════════
   CHAT WINDOW
══════════════════════════════════════════ */
.chat-window {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg);
}

/* Empty state */
.chat-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text3);
  text-align: center;
  padding: 40px;
}

.chat-empty-icon {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: var(--accent-lt);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.chat-empty h3 {
  font-size: 16px;
  color: var(--text2);
  font-weight: 600;
}

.chat-empty p {
  font-size: 13px;
  max-width: 260px;
  line-height: 1.6;
}

/* Chat topbar */
.chat-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  box-shadow: var(--shadow);
}

.chat-topbar-av {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}

.chat-topbar-av.group {
  border-radius: 10px;
}

.chat-topbar-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.chat-topbar-status {
  font-size: 11.5px;
  color: var(--green);
}

.chat-topbar-status.offline {
  color: var(--text3);
}

.chat-topbar-status.group-st {
  color: var(--text3);
}

.chat-topbar-actions {
  display: flex;
  gap: 6px;
  margin-left: auto;
}

.chat-icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .15s;
}

.chat-icon-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-lt);
}

/* Messages area */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.chat-messages::-webkit-scrollbar {
  width: 4px;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: var(--border2);
  border-radius: 4px;
}

.msg-date-sep {
  text-align: center;
  font-size: 11px;
  color: var(--text3);
  margin: 14px 0 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.msg-date-sep::before,
.msg-date-sep::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.msg-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  max-width: 100%;
}

.msg-row.own {
  flex-direction: row-reverse;
}

.msg-av-sm {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.msg-wrap {
  display: flex;
  flex-direction: column;
  max-width: 68%;
}

.msg-row.own .msg-wrap {
  align-items: flex-end;
}

.msg-sender {
  font-size: 10.5px;
  color: var(--text3);
  margin-bottom: 2px;
  padding-left: 4px;
}

.msg-bubble {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px 14px 14px 4px;
  padding: 9px 13px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text);
  word-break: break-word;
  box-shadow: var(--shadow);
}

.msg-row.own .msg-bubble {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  border-radius: 14px 14px 4px 14px;
  box-shadow: 0 2px 10px rgba(25, 80, 223, .25);
}

.msg-time {
  font-size: 10px;
  color: var(--text3);
  margin-top: 3px;
  padding: 0 4px;
}

.msg-row.own .msg-time {
  text-align: right;
}

/* File bubble */
.msg-file {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  max-width: 260px;
  box-shadow: var(--shadow);
}

.msg-file-ic {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--accent-lt);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}

.msg-file-name {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
}

.msg-file-size {
  font-size: 10.5px;
  color: var(--text3);
}

.msg-img {
  max-width: 220px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.msg-img img {
  width: 100%;
  display: block;
}

/* Input area */
.chat-input-area {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: var(--white);
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

.attach-bar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.attach-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--accent-lt);
  border: 1px solid rgba(25, 80, 223, .2);
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 11.5px;
  color: var(--accent);
}

.attach-chip button {
  background: none;
  border: none;
  color: var(--red);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0;
}

.chat-input-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 10px;
  transition: border-color .2s;
  position: relative;
}

.chat-input-row:focus-within {
  border-color: var(--accent);
  background: var(--white);
}

.chat-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 13.5px;
  color: var(--text);
  resize: none;
  max-height: 120px;
  line-height: 1.5;
  overflow-y: auto;
}

.chat-input::placeholder {
  color: var(--text3);
}

.chat-input-btns {
  display: flex;
  align-items: center;
  gap: 2px;
}

.inp-btn {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  border: none;
  background: transparent;
  color: var(--text3);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .15s;
}

.inp-btn:hover {
  background: var(--border);
  color: var(--text);
}

.inp-send {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: none;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .15s;
  flex-shrink: 0;
}

.inp-send:hover {
  background: #1440c0;
  transform: scale(1.05);
}

/* Emoji picker */
.emoji-picker {
  position: absolute;
  bottom: 48px;
  left: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px;
  display: none;
  z-index: 200;
  box-shadow: var(--shadow-md);
  flex-wrap: wrap;
  gap: 2px;
  width: 220px;
}

.emoji-picker.open {
  display: flex;
}

.emoji-picker span {
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: background .1s;
}

.emoji-picker span:hover {
  background: var(--bg);
}

/* ══════════════════════════════════════════
   MEMBERS / INFO PANEL
══════════════════════════════════════════ */
.chat-info-panel {
  width: 240px;
  border-left: 1px solid var(--border);
  background: var(--white);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  flex-shrink: 0;
}

.chat-info-panel::-webkit-scrollbar {
  width: 4px;
}

.chat-info-panel::-webkit-scrollbar-thumb {
  background: var(--border2);
  border-radius: 4px;
}

.info-sec {
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.info-sec-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .7px;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 10px;
}

.info-member {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
}

.info-av {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  position: relative;
}

.info-av .dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 2px solid var(--white);
}

.info-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
}

.info-role {
  font-size: 10.5px;
  color: var(--text3);
}

.dm-btn {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 10.5px;
  color: var(--text2);
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  transition: all .15s;
  white-space: nowrap;
}

.dm-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-lt);
}

/* ══════════════════════════════════════════
   NEW GROUP MODAL
══════════════════════════════════════════ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 5000;
  background: rgba(0, 0, 0, .35);
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(3px);
}

.modal-backdrop.open {
  display: flex;
}

.modal-box {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  width: min(420px, 90vw);
  box-shadow: var(--shadow-md);
  animation: modalPop .25s ease;
}

@keyframes modalPop {
  from {
    transform: scale(.94);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

.modal-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
}

.modal-field {
  margin-bottom: 14px;
}

.modal-lbl {
  font-size: 12px;
  font-weight: 600;
  color: var(--text2);
  margin-bottom: 5px;
  display: block;
}

.modal-inp {
  width: 100%;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 9px 12px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: var(--text);
  outline: none;
  transition: border-color .2s;
}

.modal-inp:focus {
  border-color: var(--accent);
  background: var(--white);
}

.cb-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 180px;
  overflow-y: auto;
}

.cb-list::-webkit-scrollbar {
  width: 3px;
}

.cb-list::-webkit-scrollbar-thumb {
  background: var(--border2);
  border-radius: 3px;
}

.cb-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all .15s;
}

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

.cb-item.checked {
  background: var(--accent-lt);
  border-color: rgba(25, 80, 223, .25);
}

.cb-av {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.cb-name {
  font-size: 13px;
  font-weight: 600;
  flex: 1;
  color: var(--text);
}

.cb-role {
  font-size: 10.5px;
  color: var(--text3);
}

.cb-check {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 1.5px solid var(--border2);
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all .15s;
}

.cb-item.checked .cb-check {
  background: var(--accent);
  border-color: var(--accent);
}

.modal-footer {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 18px;
}

.modal-btn {
  padding: 9px 18px;
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid var(--border);
  background: var(--bg);
  color: var(--text);
  transition: all .15s;
}

.modal-btn:hover {
  background: var(--border);
}

.modal-btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.modal-btn.primary:hover {
  background: #1440c0;
}

/* ═══════════════════════════════════════════════════
   notifications.css — News4Bharat Admin
   Place in: static/admin/css/notifications.css
═══════════════════════════════════════════════════ */

/* ── Filter bar ── */
.notif-filter-bar {
  display: flex;
  gap: 8px;
  padding: 14px 24px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.notif-flt-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: #f9fafb;
  color: #374151;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s;
}

.notif-flt-btn svg {
  flex-shrink: 0;
}

.notif-flt-btn:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
}

.notif-flt-btn.active {
  background: var(--accent, #162c6b);
  border-color: var(--accent, #162c6b);
  color: #fff;
}

.notif-flt-btn.active svg {
  stroke: #fff;
}

/* ── Notification card ── */
.notif-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid #f1f5f9;
  background: #fff;
  transition: background .12s;
  position: relative;
  cursor: pointer;
}

.notif-card:hover {
  background: #f8fafc;
}

.notif-card.unread {
  background: #f0f6ff;
}

.notif-card.unread:hover {
  background: #e8f1fd;
}

/* ── Icon box ── */
.notif-icon-box {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.notif-icon-box.article {
  background: #eff6ff;
  color: #162c6b;
}

.notif-icon-box.assign {
  background: #f0fdf4;
  color: #16a34a;
}

.notif-icon-box.role {
  background: #faf5ff;
  color: #7c3aed;
}

.notif-icon-box.category {
  background: #fff7ed;
  color: #ea580c;
}

.notif-icon-box.message {
  background: #f0fdfa;
  color: #0d9488;
}

.notif-icon-box.social {
  background: #fdf4ff;
  color: #a21caf;
}

/* ── Card body ── */
.notif-body {
  flex: 1;
  min-width: 0;
}

.notif-text {
  font-size: 13.5px;
  color: #1e293b;
  line-height: 1.45;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notif-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.notif-time {
  font-size: 11.5px;
  color: #94a3b8;
}

.notif-tag {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .4px;
  padding: 2px 7px;
  border-radius: 4px;
  background: #f1f5f9;
  color: #475569;
  text-transform: uppercase;
}

/* ── Unread dot ── */
.unread-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent, #162c6b);
  flex-shrink: 0;
}

/* ── Right-side icon action buttons ── */
.notif-icon-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  margin-left: 8px;
}

.notif-icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .15s;
  color: #64748b;
}

.notif-icon-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #1e293b;
}

.notif-icon-btn.dismiss:hover {
  background: #fef2f2;
  border-color: #fecaca;
  color: #dc2626;
}

.notif-icon-btn.view-btn:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #162c6b;
}

/* ── Empty state ── */
.notif-empty {
  padding: 56px 24px;
  text-align: center;
  color: #94a3b8;
  font-size: 13.5px;
}

.notif-empty svg {
  margin-bottom: 12px;
  opacity: .35;
}

/* ── Dismiss / remove animation ── */
.notif-card.removing {
  animation: notifSlideOut .22s ease forwards;
}

@keyframes notifSlideOut {
  to {
    opacity: 0;
    transform: translateX(18px);
    max-height: 0;
    padding: 0;
    overflow: hidden;
  }
}

/* ── Sidebar badge: hidden when no unread ── */
.notif-badge-hidden {
  display: none !important;
}

/* ── Archive filter button ── */
.notif-flt-divider {
  width: 1px;
  background: var(--border, #e5e7eb);
  margin: 4px 4px;
  align-self: stretch;
}

.notif-flt-btn.archived-btn {
  border-style: dashed;
  color: #92400e;
  background: #fffbeb;
  border-color: #fde68a;
}

.notif-flt-btn.archived-btn:hover {
  background: #fef3c7;
  border-color: #fbbf24;
}

.notif-flt-btn.archived-btn.active {
  background: #92400e;
  border-color: #92400e;
  color: #fff;
  border-style: solid;
}

.notif-flt-btn.archived-btn.active svg {
  stroke: #fff;
}

/* ── Archive count badge (inside filter button) ── */
.archive-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: #d97706;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}

/* ── Archived card appearance ── */
.notif-card.archived-card {
  opacity: .75;
  background: #fffbeb !important;
}

.notif-card.archived-card:hover {
  opacity: 1;
  background: #fef3c7 !important;
}

.notif-icon-box.archived-icon {
  filter: grayscale(40%);
  opacity: .8;
}

/* ── Archive icon button hover ── */
.notif-icon-btn.archive-btn:hover {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}

/* ── Restore icon button hover ── */
.notif-icon-btn.restore-btn:hover {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #16a34a;
}

/* ══════════════════════════════════════════
   TOAST (shared)
══════════════════════════════════════════ */
.toast-stack {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 12px 16px;
  min-width: 300px;
  max-width: 360px;
  box-shadow: var(--shadow-md);
  pointer-events: all;
  cursor: pointer;
  animation: toastIn .3s ease;
}

.toast-item.removing {
  animation: toastOut .3s ease forwards;
}

@keyframes toastIn {
  from {
    transform: translateX(40px);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes toastOut {
  to {
    transform: translateX(40px);
    opacity: 0;
  }
}

.toast-ic {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.toast-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
}

.toast-msg {
  font-size: 11.5px;
  color: var(--text2);
  margin-top: 1px;
}

.toast-t {
  font-size: 10px;
  color: var(--text3);
  margin-left: auto;
  flex-shrink: 0;
}

/* ── Shared button ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
  text-decoration: none;
}

.btn-primary:hover {
  background: #1440c0;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  background: var(--white);
  color: var(--text2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  text-decoration: none;
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Typing indicator */
.typing-row {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 0 2px;
}

.t-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text3);
  animation: tBounce 1.2s ease-in-out infinite;
}

.t-dot:nth-child(2) {
  animation-delay: .2s;
}

.t-dot:nth-child(3) {
  animation-delay: .4s;
}

@keyframes tBounce {

  0%,
  100% {
    transform: translateY(0);
    opacity: .4;
  }

  50% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

.typing-label {
  font-size: 11px;
  color: var(--text3);
  margin-left: 4px;
}

/* Stats row (notification page header) */
.notif-stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.nstat {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 18px;
  flex: 1;
  min-width: 140px;
  box-shadow: var(--shadow);
}

.nstat-ic {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nstat-num {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}

.nstat-lbl {
  font-size: 11.5px;
  color: var(--text3);
  margin-top: 1px;
}

/* ── Change Image Button ─────────────────────────── */
.change-img-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 8px 0;
  margin: 8px 0;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 8px;
  color: #a5b4fc;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}

.change-img-btn:hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: rgba(99, 102, 241, 0.5);
  color: #e0e7ff;
}

/* ── Multi-select Category Counter ──────────────── */
#cat_count_label {
  transition: color 0.2s;
}

#cat_count_label.has-selection {
  color: #6366f1;
  font-weight: 600;
}