/* Admin-specific dimensions and editor integration. Bootstrap supplies the UI. */
.admin-logo-picker { max-width: 8rem; }
.admin-table-image { width: 4.5rem; height: 3rem; }
.admin-record-image { width: 2.5rem; height: 2.5rem; }
.admin-article-cover { max-height: 25rem; }
.admin-ranking-progress { --bs-progress-height: .35rem; }
.admin-ranking-progress .progress-bar { background-color: var(--admin-accent); }
.admin-sidebar .nav-link { font-size: .875rem; }
.admin-shell .form-check-input:checked { background-color: var(--admin-accent); border-color: var(--admin-accent); }
.admin-shell {
  --admin-nav-bg: #14233b;
  --admin-accent: #2563eb;
  min-height: 100dvh;
  background: var(--color-pearl-white);
}
.admin-sidebar {
  --bs-dark-rgb: 20, 35, 59;
  --bs-offcanvas-width: 15rem;
  --bs-offcanvas-bg: var(--admin-nav-bg);
  --bs-offcanvas-color: white;
}
.admin-sidebar .nav-link {
  color: #cfdef4;
}
.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link:focus-visible {
  color: white;
  background: rgba(255, 255, 255, 0.08);
}
.admin-sidebar .nav-link.active {
  color: white;
  background: var(--admin-accent);
}
.admin-shell .btn-primary {
  --bs-btn-bg: var(--admin-accent);
  --bs-btn-border-color: var(--admin-accent);
  --bs-btn-hover-bg: #1d4ed8;
  --bs-btn-hover-border-color: #1d4ed8;
  --bs-btn-active-bg: #1e40af;
  --bs-btn-active-border-color: #1e40af;
  --bs-btn-disabled-bg: #2563eb;
  --bs-btn-disabled-border-color: #2563eb;
}
.admin-main {
  min-width: 0;
}
.admin-content {
  max-width: 100rem;
}
.admin-avatar {
  width: 2.25rem;
  height: 2.25rem;
}
.admin-table {
  min-width: 60rem;
}
.admin-table td,
.admin-table th {
  padding: 1rem;
  vertical-align: middle;
}
.admin-table th {
  white-space: nowrap;
}
/* The scroll region owns the viewport; tables retain their content width. */
.admin-catalog-table-scroll {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
}
.admin-article-table,
.admin-category-table {
  width: max-content;
  min-width: 100%;
}
/* Fill the workspace; the details column uses the space left by compact utility columns. */
.admin-article-table {
  width: 100%;
  min-width: 52rem;
  table-layout: fixed;
}
.admin-article-table th:nth-child(2) { width: 6rem; }
.admin-article-table th:nth-child(3) { width: 8rem; }
.admin-article-table th:nth-child(4) { width: 10rem; }
.admin-article-table th:nth-child(5) { width: 7rem; }
.admin-article-table :is(th, td):first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}
.admin-article-metadata { font-size: .8125rem; }
.admin-article-category { font-size: .8125rem; font-weight: 600; white-space: normal; }
.admin-article-topic { color: var(--bs-body-color); font-weight: 600; }
.admin-category-table :is(th, td):first-child {
  min-width: 18rem;
}
.admin-article-table :is(th, td),
.admin-category-table :is(th, td) { white-space: nowrap; }
.admin-article-table :is(th, td):first-child { white-space: normal; }
.admin-row-action {
  width: 9rem;
}
.admin-status {
  font-size: 0.73rem;
  font-weight: 500;
}
.admin-chart {
  width: 100%;
  height: auto;
  max-height: 19rem;
}
.admin-dialog {
  width: min(38rem, calc(100% - 2rem));
  max-height: calc(100dvh - 2rem);
}
.admin-review-dialog {
  width: min(56rem, calc(100% - 2rem));
}
.admin-dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
}
.admin-flash {
  z-index: 1100;
  width: max-content;
  max-width: calc(100vw - 2rem);
}
.admin-editor-canvas {
  min-height: 34rem;
  /* Reserve a small toolbar gutter instead of Editor.js's centered text column. */
  padding: 1rem 3rem;
}
.admin-editor-canvas .ce-block__content,
.admin-editor-canvas .ce-toolbar__content {
  max-width: none;
  margin-inline: 0;
}
.admin-editor-canvas .codex-editor__redactor {
  margin-right: 0;
  padding-bottom: 3rem !important;
}
.article-editor-sections > section {
  scroll-margin-top: var(--article-navigation-height, 6rem);
  min-width: 0;
}
.article-editor-sections section[id] {
  scroll-margin-top: var(--article-navigation-height, 6rem);
}
.article-editor-navigation {
  position: sticky;
  top: .75rem;
  z-index: 1020;
  overflow-x: auto;
}
.article-editor-navigation > a { flex-shrink: 0; }
.article-editor-page [data-article-error],
.article-editor-page [data-article-flash] {
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  z-index: 1090;
  width: min(28rem, calc(100vw - 2rem));
  max-height: 40dvh;
  overflow-y: auto;
  box-shadow: var(--bs-box-shadow);
}
.admin-editor-canvas.is-invalid {
  border-color: var(--bs-form-invalid-border-color) !important;
}
@media (max-width: 650px) {
  .admin-editor-canvas {
    padding-inline: 1rem;
  }
}
.admin-review-content img {
  max-width: 100%;
  height: auto;
}
.admin-review-content p {
  line-height: 1.8;
}
.admin-gallery-photo {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
[hidden] {
  display: none !important;
}
@media (min-width: 992px) {
  .admin-sidebar {
    position: sticky;
    top: 0;
    width: 15rem;
    height: 100dvh;
  }
}
