:root {
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
  color: #172033;
  background: #f5f7fb;
  line-height: 1.5;
  --navy: #12233f;
  --blue: #2563eb;
  --line: #e3e8f1;
  --muted: #68758a;
  --danger: #c63d4f;
  --green: #17805c;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: var(--blue);
}
button,
input,
select,
textarea {
  font: inherit;
}
.topbar {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px max(22px, calc((100% - 1240px) / 2));
  background: rgba(18, 35, 63, 0.98);
  box-shadow: 0 4px 18px #0b18302b;
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: #fff;
  text-decoration: none;
  font-weight: 750;
  letter-spacing: -0.02em;
}
.brand small {
  display: block;
  color: #aebbd0;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(135deg, #3b82f6, #14b8a6);
  font-size: 0.82rem;
  box-shadow: inset 0 0 0 1px #ffffff30;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 5px;
}
.nav-links a {
  color: #bdc8d9;
  text-decoration: none;
  padding: 9px 13px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
}
.nav-links a:hover,
.nav-links a.active {
  color: #fff;
  background: #ffffff14;
}
.nav-links .logout {
  margin-left: 8px;
  border: 1px solid #ffffff26;
}
main {
  max-width: 1240px;
  margin: 28px auto;
  padding: 0 20px;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin: 12px 0 22px;
}
.page-heading h1 {
  font-size: 2rem;
  letter-spacing: -0.035em;
  margin: 3px 0;
}
.page-heading p {
  margin: 0;
  color: var(--muted);
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--blue);
  font-size: 0.7rem;
  font-weight: 800;
}
.record-count {
  background: #eaf1ff;
  color: #1d4ed8;
  padding: 11px 18px;
  border-radius: 12px;
  text-align: center;
}
.record-count strong {
  display: block;
  font-size: 1.35rem;
}
.record-count span {
  font-size: 0.72rem;
}
.cards {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}
.cards article,
.panel,
.login,
.filter-panel,
.table-panel,
.article-detail {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 5px 22px #1720330a;
}
.cards article {
  padding: 18px;
}
.cards b {
  display: block;
  font-size: 1.8rem;
  color: var(--blue);
}
.cards span,
.panel p {
  color: var(--muted);
}
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 18px 0;
}
.panel {
  padding: 20px;
  margin-bottom: 18px;
}
.panel h2 {
  margin-top: 0;
  font-size: 1.08rem;
}
label {
  display: block;
  margin: 12px 0;
  color: #46546a;
  font-size: 0.82rem;
  font-weight: 650;
}
input,
textarea,
select {
  display: block;
  width: 100%;
  padding: 10px 11px;
  margin-top: 5px;
  border: 1px solid #ccd4e0;
  border-radius: 8px;
  background: #fff;
  color: #172033;
  outline: none;
}
input:focus,
textarea:focus,
select:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px #3b82f61a;
}
button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--blue);
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 10px 15px;
  cursor: pointer;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.84rem;
  transition: 0.16s ease;
}
button:hover,
.button:hover {
  filter: brightness(0.96);
  transform: translateY(-1px);
}
button:disabled {
  opacity: 0.58;
  cursor: wait;
  transform: none;
}
.secondary,
.button.ghost {
  background: #fff;
  color: #334155;
  border: 1px solid #cbd5e1;
}
.notice {
  background: #dcfce7;
  color: #166534;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 16px;
}
.error {
  background: #ffe3e3;
  color: #a61b1b;
  padding: 10px;
  border-radius: 8px;
}
.login {
  max-width: 390px;
  margin: 12vh auto;
  padding: 24px;
}
.section-title,
.actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.actions {
  justify-content: flex-end;
}
.scroll,
.table-scroll {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}
th,
td {
  text-align: left;
  border-bottom: 1px solid #edf0f5;
  padding: 10px;
  white-space: nowrap;
}
.toggle {
  font-size: 0.74rem;
  padding: 5px 9px;
}
.toggle.on {
  background: var(--green);
}
.toggle.off {
  background: #8291a7;
}
.filter-panel {
  padding: 18px;
  margin-bottom: 18px;
}
.modern-filters {
  display: grid;
  grid-template-columns: 2fr 1.2fr 1fr 1fr 1fr 1fr;
  gap: 12px;
  align-items: end;
}
.modern-filters label {
  margin: 0;
}
.modern-filters label span {
  display: block;
  margin-bottom: 6px;
}
.modern-filters input,
.modern-filters select {
  margin: 0;
  height: 42px;
}
.search-field {
  grid-column: span 2;
}
.filter-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  grid-column: span 2;
}
.filter-actions a {
  font-size: 0.84rem;
}
.export-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
  margin-top: 17px;
  padding-top: 15px;
  color: var(--muted);
  font-size: 0.82rem;
}
.export-bar div {
  display: flex;
  gap: 8px;
}
.table-panel {
  overflow: hidden;
}
.article-table th {
  background: #f8fafc;
  color: #64748b;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 12px 14px;
}
.article-table td {
  padding: 13px 14px;
  vertical-align: middle;
  white-space: normal;
}
.article-table tbody tr {
  transition: 0.2s;
}
.article-table tbody tr:hover {
  background: #fafcff;
}
.article-table tr.removing {
  opacity: 0;
  transform: translateX(15px);
}
.article-cell {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 410px;
}
.article-cell img,
.table-no-image {
  width: 92px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  background: #e8edf5;
  flex: 0 0 auto;
}
.table-no-image {
  display: grid;
  place-items: center;
  color: #8291a7;
  font-size: 0.67rem;
}
.table-title {
  display: block;
  color: #182238;
  text-decoration: none;
  font-weight: 750;
  line-height: 1.35;
  margin-bottom: 5px;
}
.table-title:hover {
  color: var(--blue);
}
.article-cell p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
}
.article-table td small {
  display: block;
  color: #8a96a8;
  margin-top: 4px;
}
.ratio {
  display: inline-block;
  color: #166534;
  background: #dcfce7;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 0.69rem;
  font-weight: 800;
}
.quick-review,
.review-button {
  white-space: nowrap;
}
.danger {
  background: #fff0f1 !important;
  color: #a9293b !important;
  border: 1px solid #f4c6cc !important;
}
.restore {
  background: #e9f9f2 !important;
  color: #087052 !important;
  border: 1px solid #bce9d8 !important;
}
.status-chip {
  display: inline-flex;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.72rem;
  font-weight: 800;
}
.status-chip.news {
  background: #dcfce7;
  color: #166534;
}
.status-chip.non-news {
  background: #fff0f1;
  color: #a9293b;
}
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px;
  color: var(--muted);
}
.empty-state strong {
  color: #334155;
  font-size: 1.05rem;
}
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin: 22px;
}
.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  background: #172033;
  color: #fff;
  padding: 12px 17px;
  border-radius: 9px;
  box-shadow: 0 8px 30px #0003;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: 0.2s;
  z-index: 40;
}
.toast.show {
  opacity: 1;
  transform: none;
}
.toast.error-toast {
  background: #a9293b;
}
.detail-shell {
  max-width: 1120px;
}
.detail-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.back-link {
  text-decoration: none;
  font-weight: 650;
}
.article-detail {
  padding: 28px;
}
.detail-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}
.detail-heading h1 {
  font-size: 2.15rem;
  line-height: 1.2;
  letter-spacing: -0.035em;
  margin: 7px 0 12px;
  max-width: 850px;
}
.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  color: var(--muted);
  font-size: 0.82rem;
}
.feature-preview {
  margin: 26px 0;
}
.feature-preview img {
  display: block;
  width: 100%;
  max-height: 620px;
  object-fit: contain;
  background: #edf1f6;
  border-radius: 12px;
}
.feature-preview figcaption {
  font-size: 0.75rem;
  color: var(--muted);
  padding-top: 7px;
}
.feature-placeholder {
  display: grid;
  place-items: center;
  min-height: 180px;
  background: #f1f4f8;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  color: var(--muted);
  margin: 25px 0;
}
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 32px;
  margin-top: 28px;
}
.article-copy {
  font-family: "Noto Serif Bengali", "Noto Serif", Georgia, serif;
  font-size: 1.08rem;
  line-height: 1.95;
  color: #202b3e;
}
.provenance {
  border-left: 1px solid var(--line);
  padding-left: 22px;
}
.provenance h2 {
  font-size: 0.95rem;
  margin-top: 0;
}
.provenance dl {
  display: block;
}
.provenance dt {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #8390a4;
  font-weight: 750;
  margin-top: 14px;
}
.provenance dd {
  margin: 3px 0;
  overflow-wrap: anywhere;
  font-size: 0.82rem;
}
.provenance code {
  font-size: 0.67rem;
}
.review-button {
  margin-top: 4px;
}
.login h1 {
  font-size: 1.35rem;
}
@media (max-width: 1000px) {
  .modern-filters {
    grid-template-columns: repeat(3, 1fr);
  }
  .search-field {
    grid-column: span 2;
  }
  .article-layout {
    grid-template-columns: 1fr;
  }
  .provenance {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 20px 0 0;
  }
}
@media (max-width: 760px) {
  .topbar {
    align-items: flex-start;
    gap: 12px;
    position: static;
  }
  .nav-links {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .nav-links a {
    padding: 7px 8px;
  }
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .section-title,
  .page-heading,
  .export-bar,
  .detail-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .actions {
    flex-wrap: wrap;
  }
  .modern-filters {
    grid-template-columns: 1fr;
  }
  .search-field,
  .filter-actions {
    grid-column: auto;
  }
  .article-cell {
    min-width: 300px;
  }
  .detail-heading h1 {
    font-size: 1.6rem;
  }
  .article-detail {
    padding: 20px;
  }
}

.stats-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.78rem;
}
.stats-heading span {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
  color: #42516a;
}
.stats-heading i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 4px #22c55e18;
}
.stats-heading i.offline {
  background: #ef4444;
  box-shadow: 0 0 0 4px #ef444418;
}
.stats-heading i.online {
  background: #22c55e;
}
.stat-pop {
  animation: statPop 0.35s ease;
  transform-origin: left;
}
@keyframes statPop {
  50% {
    transform: scale(1.12);
    color: #14b8a6;
  }
}
