/* ================================================================
   Article content typography — outside @layer so it always wins
   over Tailwind preflight resets regardless of cascade layers.
   Applied via .article-content wrapper in report.html.
   ================================================================ */

.article-content {
  overflow-wrap: break-word;
  word-break: break-word;
}

.article-content h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: #1b2545;
  line-height: 1.3;
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
  padding-left: 0.75rem;
  border-left: 3px solid #c8963e;
}

.article-content h3,
.article-content h4 {
  font-weight: 600;
  margin-top: 1.75rem;
  margin-bottom: 0.6rem;
  padding-left: 0.75rem;
  border-left: 3px solid #c8963e;
}

.article-content h3 {
  font-size: 1.15rem;
  color: #1b2545;
}

.article-content h4 {
  font-size: 1rem;
  color: #2a3f5f;
}

.article-content p,
.article-content li {
  line-height: 1.8;
  color: #343a40;
  margin-bottom: 0.75rem;
}

.article-content ul {
  list-style-type: disc;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
}

.article-content ol {
  list-style-type: decimal;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
}

.article-content li { margin-bottom: 0.25rem; }

.article-content table p,
.article-content table li {
  line-height: inherit;
  color: inherit;
  margin-bottom: 0;
}

.article-content table p:empty { display: none; }

.article-content .font-monospace {
  font-size: 0.8rem;
  line-height: 1.65;
  overflow-x: auto;
  word-break: break-all;
}

.article-content table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.85rem;
  margin: 1rem 0;
}

.article-content table th,
.article-content table td {
  padding: 0.35rem 0.6rem;
  border: 1px solid #c0c0c0;
  vertical-align: middle;
}

.article-content table th,
.article-content table th * {
  background-color: #08082e;
  color: #ffffff !important;
  font-weight: 600;
}

.article-content table td { background-color: #ffffff; color: #212529; }

.article-content table tbody tr:nth-child(even) td { background-color: #f2f2f2; }

.article-content blockquote {
  border-left: 4px solid #c8963e;
  background: rgba(200, 150, 62, 0.07);
  margin: 1rem 0;
  padding: 0.75rem 1.25rem;
  border-radius: 0 0.4rem 0.4rem 0;
  color: #495057;
  font-style: italic;
}

.article-content blockquote p { margin-bottom: 0; }

.article-content figure {
  margin: 1.25rem 0;
  display: flow-root;
}

.article-content figure img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 0.375rem;
  margin: 0;
}

.article-content figure[data-align="center"] { text-align: center; margin-left: auto; margin-right: auto; }
.article-content figure[data-align="left"]   { float: left;  margin: 0.5rem 1.5rem 0.5rem 0; max-width: 48%; }
.article-content figure[data-align="right"]  { float: right; margin: 0.5rem 0 0.5rem 1.5rem; max-width: 48%; }

.article-content figcaption {
  font-size: 0.8rem;
  color: #6c757d;
  font-style: italic;
  margin-top: 0.4rem;
  text-align: center;
}

.article-content img {
  max-width: 100%;
  height: auto;
}

.article-content pre,
.article-content code {
  font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.85em;
}

.article-content pre {
  background: #1e2433;
  color: #e2e8f0;
  padding: 1rem 1.25rem;
  border-radius: 0.4rem;
  overflow-x: auto;
  margin: 1rem 0;
  line-height: 1.6;
}

.article-content code {
  background: rgba(8, 8, 46, 0.07);
  padding: 0.1em 0.35em;
  border-radius: 0.25rem;
  color: #1b2545;
}

.article-content pre code {
  background: none;
  padding: 0;
  color: inherit;
  border-radius: 0;
}

.article-content strong { font-weight: 700; }
.article-content em { font-style: italic; }

.article-content a {
  color: #c8963e;
  text-decoration: underline;
}

.article-content a:hover { color: #a07830; }

/* ================================================================
   IOC Block
   ================================================================ */

.ioc-block { background:#fff; border-left:4px solid #08082e; border-radius:0 0.4rem 0.4rem 0;
             margin:1.25rem 0; overflow:hidden; box-shadow:0 1px 4px rgba(0,0,0,0.08); }
.ioc-block-header { background:#08082e; color:#fff; padding:0.4rem 0.75rem;
                    font-family:'IBM Plex Mono',monospace; font-size:0.72rem;
                    font-weight:600; text-transform:uppercase; letter-spacing:0.1em; }
.ioc-block table { width:100%; border-collapse:collapse; font-size:0.82rem; margin:0; }
.ioc-block table th, .ioc-block table td { padding:0.25rem 0.6rem; border-bottom:1px solid #e9ecef; vertical-align:middle; }
.ioc-block table th { background:#f8f9fa; color:#495057; font-weight:600; font-size:0.72rem;
                      text-transform:uppercase; letter-spacing:0.05em; }
.ioc-block table tbody tr:last-child td { border-bottom:none; }
.ioc-type    { background:#f0f0f5; font-family:'IBM Plex Mono',monospace; font-size:0.75rem;
               white-space:nowrap; color:#1b2545; font-weight:600; }
.ioc-value   { font-family:'IBM Plex Mono',monospace; font-size:0.8rem; word-break:break-all; }
.ioc-context { font-size:0.8rem; color:#495057; }
.ioc-block-editor { cursor:default; user-select:none; position:relative; }
.ioc-block-preview { padding:0.4rem 0.75rem; }

/* ================================================================
   Confidence badges + popover
   ================================================================ */

.confidence-badge { display:inline-flex; align-items:center; padding:0.1rem 0.5rem;
                    border-radius:0.25rem; font-size:0.62rem; font-weight:700;
                    letter-spacing:0.08em; text-transform:uppercase; vertical-align:middle; }
.confidence-badge-high     { background:#d1fae5; color:#065f46; border:1px solid #6ee7b7; }
.confidence-badge-moderate { background:#fef3c7; color:#92400e; border:1px solid #fcd34d; }
.confidence-badge-low      { background:#f3f4f6; color:#374151; border:1px solid #d1d5db; }

.confidence-meta-wrap { position:relative; display:inline-block; vertical-align:middle; }
.confidence-help-icon { display:inline-flex; align-items:center; justify-content:center;
                        width:14px; height:14px; border-radius:50%; background:#dee2e6;
                        color:#6c757d; font-size:0.65rem; font-weight:700; cursor:pointer;
                        margin-left:0.25rem; border:none; outline:none; }
.confidence-help-icon:hover, .confidence-help-icon:focus { background:#adb5bd; color:#212529; }
.confidence-popover { display:none; position:absolute; top:calc(100% + 6px); left:0;
                      min-width:280px; background:#fff; border:1px solid #dee2e6;
                      border-radius:0.4rem; padding:0.75rem 1rem; font-size:0.8rem;
                      line-height:1.55; color:#343a40; box-shadow:0 4px 16px rgba(0,0,0,0.12);
                      z-index:100; }
.confidence-popover p { margin-bottom:0.5rem; color:#343a40; line-height:1.55; }
.confidence-popover-link { font-size:0.78rem; font-weight:600; color:#c8963e; text-decoration:none; }
.confidence-popover-link:hover { color:#a07830; text-decoration:underline; }
.confidence-meta-wrap:hover .confidence-popover,
.confidence-meta-wrap:focus-within .confidence-popover { display:block; }

/* ================================================================
   Related articles
   ================================================================ */

.related-articles-section { margin-top:0.5rem; }
.related-articles-heading { font-size:1rem; font-weight:700; color:#1b2545; text-transform:uppercase;
                            letter-spacing:0.06em; padding-bottom:0.5rem;
                            border-bottom:2px solid #c8963e; margin-bottom:1rem; }
.related-article-card { background:#fff; border:1px solid #dee2e6; border-radius:0.4rem;
                        padding:1rem; box-shadow:0 1px 4px rgba(0,0,0,0.06);
                        display:flex; flex-direction:column; gap:0.35rem;
                        transition:border-color 0.18s, box-shadow 0.18s; }
.related-article-card:hover { border-color:#c8963e; box-shadow:0 2px 8px rgba(200,150,62,0.18); }
.related-article-title { font-size:0.9rem; font-weight:600; color:#1b2545;
                         text-decoration:none; line-height:1.4; transition:color 0.15s; }
.related-article-title:hover { color:#c8963e; }
.related-article-date { font-size:0.75rem; color:#6c757d; margin-top:auto; }

/* ================================================================
   Trending sidebar cards
   ================================================================ */

.trending-card { background:#fff; border:1px solid #dee2e6; border-radius:0.4rem;
                 padding:0.75rem; margin-bottom:0.6rem;
                 box-shadow:0 1px 3px rgba(0,0,0,0.05);
                 transition:border-color 0.18s, box-shadow 0.18s; }
.trending-card:last-child { margin-bottom:0; }
.trending-card:hover { border-color:#c8963e; box-shadow:0 2px 8px rgba(200,150,62,0.15); }
.trending-badge { font-size:0.58rem !important; padding:0.05rem 0.35rem !important;
                  letter-spacing:0.04em; display:inline-block; margin-bottom:0.35rem; }
.trending-title { margin-bottom:0.25rem; }
.trending-title-link { font-size:0.82rem; font-weight:600; color:#1b2545;
                       text-decoration:none; line-height:1.35; display:block;
                       transition:color 0.15s; }
.trending-title-link:hover { color:#c8963e; }
.trending-date { font-size:0.72rem; color:#6c757d; }

/* ================================================================
   Footnotes
   ================================================================ */

.footnote-ref {
  color: #c8963e;
  font-weight: 700;
  font-size: 0.72em;
  vertical-align: super;
  text-decoration: none;
  cursor: pointer;
  font-family: 'IBM Plex Mono', monospace;
}
.footnote-ref:hover { color: #a07830; }

.footnotes-section {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 2px solid #dee2e6;
}
.footnotes-section h4 {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #6c757d;
  margin-bottom: 0.75rem;
}
.footnotes-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footnotes-list li {
  font-size: 0.82rem;
  color: #495057;
  line-height: 1.6;
  margin-bottom: 0.4rem;
  padding-left: 2rem;
  position: relative;
}
.footnotes-list li .fn-marker {
  position: absolute;
  left: 0;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  font-weight: 700;
  color: #c8963e;
}

/* ================================================================
   Print button (screen only)
   ================================================================ */

.print-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.22rem 0.6rem;
  font-size: 0.78rem;
  color: #6c757d;
  background: transparent;
  border: 1px solid #dee2e6;
  border-radius: 0.3rem;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  line-height: 1.4;
  white-space: nowrap;
  flex-shrink: 0;
}
.print-btn:hover {
  color: #1b2545;
  border-color: #adb5bd;
  background: #f8f9fa;
}

/* Print-only elements: invisible on screen */
.rpt-print-header,
.rpt-print-eyebrow,
.rpt-print-org,
.rpt-print-urlline { display: none; }

/* ── Report action buttons (share + print row) ── */
.report-actions {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
}

.report-actions-divider {
  width: 1px;
  height: 20px;
  background: #dee2e6;
  margin: 0 0.15rem;
}

.report-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  font-size: 0.88rem;
  color: #6c757d;
  background: transparent;
  border: 1px solid #dee2e6;
  border-radius: 0.3rem;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  text-decoration: none;
  line-height: 1;
}
.report-action-btn:hover {
  color: #1b2545;
  border-color: #adb5bd;
  background: #f8f9fa;
}

/* ================================================================
   Back to top button
   ================================================================ */

.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #08082e;
  border: 2px solid #c8963e;
  color: #c8963e;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s, background 0.15s;
  z-index: 200;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
.back-to-top--visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.back-to-top:hover {
  background: #c8963e;
  color: #fff;
}

/* ================================================================
   @page — Paper size and margins
   ================================================================ */

@page {
  size: A4;
  margin: 2.2cm 2.8cm 2.5cm;
}

/* ================================================================
   @media print — Report page
   ================================================================ */

@media print {

  /* ── Hide UI chrome ── */
  #site-hero,
  #main-navbar,
  #main-footer,
  #report-breadcrumb,
  .related-articles-section,
  .confidence-help-icon,
  .confidence-popover,
  .report-actions,
  .report-sidebar-card { display: none !important; }

  /* ── Page & body ── */
  body {
    background: #fff !important;
    font-size: 10.5pt;
    color: #111;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* ── Remove container constraints ── */
  #article-display {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  /* ── Article card: flat ── */
  #article-display .article-card {
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
  }

  /* ── Print document header ── */
  .rpt-print-header {
    display: block;
    padding-bottom: 0.85rem;
    margin-bottom: 1.5rem;
    border-bottom: 2.5pt solid #c8963e;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .rpt-print-eyebrow {
    display: block;
    font-size: 7pt;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: #c8963e;
    margin-bottom: 0.2rem;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .rpt-print-org {
    display: block;
    font-size: 14pt;
    font-weight: 700;
    color: #08082e;
    letter-spacing: -0.01em;
    line-height: 1.1;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .rpt-print-urlline {
    display: block;
    font-size: 7pt;
    color: #999;
    margin-top: 0.4rem;
    word-break: break-all;
    font-family: 'IBM Plex Mono', monospace;
  }

  /* ── Article title ── */
  #article-display .article-card h2 {
    font-size: 20pt;
    color: #08082e;
    line-height: 1.2;
    margin-bottom: 0.6rem;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* ── Meta row ── */
  .article-meta {
    justify-content: flex-start !important;
    font-size: 9pt;
    color: #444;
    border-bottom: 0.5pt solid #dee2e6;
    padding-bottom: 0.5rem;
    margin-bottom: 0.75rem;
  }

  /* ── Tags ── */
  .article-tag {
    background: #f0f0f0 !important;
    color: #333 !important;
    font-size: 7pt;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* ── Section headings: preserve gold left border ── */
  .article-content h2,
  .article-content h3,
  .article-content h4,
  #article-display .article-card h3,
  #article-display .article-card h4 {
    color: #08082e;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    break-after: avoid;
    page-break-after: avoid;
  }

  /* ── Body text ── */
  .article-content p,
  .article-content li {
    color: #111;
    line-height: 1.7;
    orphans: 3;
    widows: 3;
  }

  /* ── Links: show URL inline ── */
  .article-content a[href]::after {
    content: " (" attr(href) ")";
    font-size: 7.5pt;
    color: #666;
    word-break: break-all;
    font-weight: normal;
    text-decoration: none;
  }
  /* Suppress URL expansion for MITRE links and footnote refs */
  .article-content a.attack-link::after,
  .article-content a.footnote-ref::after { content: none; }

  /* ── Blockquotes: preserve gold border ── */
  .article-content blockquote {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  /* ── Code blocks: light theme for paper ── */
  .article-content pre {
    background: #f5f5f5 !important;
    color: #111 !important;
    border: 0.5pt solid #ccc;
    box-shadow: none !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .article-content pre code { color: #111 !important; }
  .article-content code {
    background: #f0f0f0 !important;
    color: #111 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* ── Tables ── */
  .article-content table th,
  .article-content table th * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .article-content table tbody tr:nth-child(even) td {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  table { break-inside: avoid; page-break-inside: avoid; }

  /* ── IOC blocks ── */
  .ioc-block {
    box-shadow: none !important;
    border: 0.5pt solid #aaa !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .ioc-block-header {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* ── Confidence badges ── */
  .confidence-badge {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* ── Footnotes ── */
  .footnotes-section {
    break-before: page;
    page-break-before: always;
    margin-top: 0;
    padding-top: 1rem;
  }
}

/* ================================================================
   Admin — shared component styles (from admin_base.html)
   ================================================================ */

.admin-badge { font-size: 0.65rem; letter-spacing: 0.1em; vertical-align: middle; }

/* ---- Forms ---- */
.form-control, .form-select {
  display: block; width: 100%; padding: 0.375rem 0.75rem;
  font-size: 1rem; line-height: 1.5; color: #212529; background: #fff;
  border: 1px solid #dee2e6; border-radius: 0.375rem; outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-control:focus, .form-select:focus {
  border-color: #c8963e; box-shadow: 0 0 0 0.2rem rgba(200,150,62,0.2);
}
.form-control-lg { padding: 0.5rem 1rem; font-size: 1.125rem; border-radius: 0.5rem; }
.form-control-sm { padding: 0.25rem 0.5rem; font-size: 0.875rem; }
.form-label { display: block; margin-bottom: 0.5rem; }
textarea.form-control { resize: vertical; }

/* ---- Buttons ---- */
.btn {
  display: inline-block; font-weight: 400; text-align: center; cursor: pointer;
  vertical-align: middle; user-select: none; padding: 0.375rem 0.75rem;
  font-size: 0.875rem; border-radius: 0.375rem; border: 1px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  text-decoration: none; line-height: 1.5; background: transparent;
}
.btn:disabled { opacity: 0.65; cursor: not-allowed; }
.btn-sm { padding: 0.2rem 0.5rem; font-size: 0.8rem; border-radius: 0.25rem; }
.btn-dark { background: #08082e; color: #fff; border-color: #08082e; }
.btn-dark:hover { background: #1b2545; color: #fff; }
.btn-link { background: transparent; border-color: transparent; color: #c8963e; text-decoration: underline; padding: 0; }
.btn-link:hover { color: #a07830; }
.btn-outline-secondary { color: #6c757d; border-color: #6c757d; }
.btn-outline-secondary:hover { background: #6c757d; color: #fff; }
.btn-outline-primary { color: #c8963e; border-color: #c8963e; }
.btn-outline-primary:hover { background: #c8963e; color: #fff; }
.btn-outline-danger { color: #dc3545; border-color: #dc3545; }
.btn-outline-danger:hover { background: #dc3545; color: #fff; }
.btn-group { display: inline-flex; }
.btn-group .btn { border-radius: 0; }
.btn-group .btn:first-child { border-radius: 0.25rem 0 0 0.25rem; }
.btn-group .btn:last-child  { border-radius: 0 0.25rem 0.25rem 0; }

/* ---- Table ---- */
.table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.table th, .table td { padding: 0.5rem; border-bottom: 1px solid #dee2e6; vertical-align: middle; }
.table thead th { font-weight: 600; color: #fff; background: #08082e; border-bottom: 2px solid #c8963e; white-space: nowrap; }
.table-hover tbody tr:hover td { background: rgba(0,0,0,0.025); }

/* ---- Dropdown (Bootstrap JS drives open/close) ---- */
.dropdown { position: relative; display: inline-block; }
.dropdown-menu {
  display: none; position: absolute; z-index: 1000;
  min-width: 10rem; padding: 0.35rem 0; background: #fff;
  border: 1px solid rgba(0,0,0,0.15); border-radius: 0.375rem;
  box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.15); margin-top: 2px;
}
.dropdown-menu.show { display: block; }
.dropdown-item {
  display: block; width: 100%; padding: 0.3rem 1rem;
  font-size: 0.82rem; color: #212529; background: transparent;
  border: none; text-align: left; cursor: pointer; text-decoration: none;
}
.dropdown-item:hover { background: #f8f9fa; }
.dropdown-item.text-danger { color: #dc3545 !important; }
.dropdown-divider { height: 0; border-top: 1px solid #dee2e6; margin: 0.25rem 0; }
.dropdown-toggle::after {
  display: inline-block; margin-left: 0.255em; content: "";
  border-top: 0.3em solid; border-right: 0.3em solid transparent;
  border-bottom: 0; border-left: 0.3em solid transparent; vertical-align: middle;
}

/* ---- Modal (Bootstrap JS drives show/hide) ---- */
.modal {
  display: none; position: fixed; top: 0; left: 0;
  width: 100%; height: 100%; z-index: 1050;
  overflow-y: auto; background: rgba(0,0,0,0.5);
}
.modal.show { display: flex; align-items: flex-start; justify-content: center; }
.modal-dialog { position: relative; width: auto; max-width: 500px; margin: 1.75rem auto; }
.modal-xl { max-width: min(1140px, 95vw); }
.modal-dialog-scrollable { max-height: calc(100% - 3.5rem); }
.modal-dialog-scrollable .modal-content { max-height: 100%; overflow: hidden; display: flex; flex-direction: column; }
.modal-dialog-scrollable .modal-body { overflow-y: auto; }
.modal-content { background: #fff; border-radius: 0.5rem; box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.5); display: flex; flex-direction: column; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 0.75rem 1rem; border-bottom: 1px solid #dee2e6; flex-shrink: 0; }
.modal-body { padding: 1rem; flex: 1; }
.modal-footer { display: flex; justify-content: flex-end; gap: 0.5rem; padding: 0.75rem 1rem; border-top: 1px solid #dee2e6; }
.modal-title { margin: 0; font-size: 1rem; font-weight: 600; }
.btn-close {
  padding: 0.5rem; border: none; cursor: pointer; opacity: 0.6; border-radius: 0.25rem; background: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center; background-size: 1em;
  width: 1.5em; height: 1.5em;
}
.btn-close:hover { opacity: 1; }
.btn-close-white { filter: invert(1) grayscale(100%) brightness(200%); }
.fade { opacity: 0; transition: opacity 0.15s linear; }
.fade.show { opacity: 1; }

/* ---- Utilities ---- */
/* Bootstrap-named classes not in Tailwind, or with different Bootstrap-scale values */
.text-muted, .text-muted small { color: #6c757d; }
.text-white-50 { color: rgba(255,255,255,0.5); }
.text-danger { color: #dc3545; }
.text-uppercase { text-transform: uppercase; }
.fw-semibold { font-weight: 600; }
.fw-bold     { font-weight: 700; }
.fw-normal   { font-weight: 400; }
.small       { font-size: 0.875em; }
.small.text-muted { color: #6c757d; }
/* Bootstrap spacing scale differs from Tailwind for these values */
.py-5 { padding-top: 3rem; padding-bottom: 3rem; }   /* Tailwind py-5 = 1.25rem */
.ms-1 { margin-left: 0.25rem; }
.ms-2 { margin-left: 0.5rem; }
.me-1 { margin-right: 0.25rem; }
.me-2 { margin-right: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }     /* Bootstrap mb-3 = 1rem; Tailwind = 0.75rem */
.mb-4 { margin-bottom: 1.5rem; }   /* Bootstrap mb-4 = 1.5rem; Tailwind = 1rem */
.p-3  { padding: 1rem; }           /* Bootstrap p-3 = 1rem; Tailwind = 0.75rem */
.w-100 { width: 100%; }
.fs-5  { font-size: 1.25rem; }
.no-underline { text-decoration: none; }

/* ---- Cards ---- */
.form-card, .table-card {
  background: #fff; border: 1px solid #dee2e6;
  border-radius: 0.5rem; box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.form-card-header, .table-card-header {
  background: #08082e; border-bottom: 2px solid #c8963e;
  padding: 0.55rem 1rem; border-radius: 0.5rem 0.5rem 0 0;
  font-weight: 600; font-size: 0.8rem; color: #fff;
  display: flex; align-items: center; justify-content: space-between;
}
.form-card-body { padding: 1.5rem; }

/* ---- Admin subheader ---- */
#site-subheader { background: #fff; border-bottom: 1px solid #dee2e6; }

/* ---- Admin content wrapper ---- */
.admin-main { max-width: 1280px; margin: 0 auto; }

/* ---- Toast ---- */
.toast {
  display: none; opacity: 0; position: relative;
  border-radius: 0.4rem; min-width: 200px; max-width: 320px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  transition: opacity 0.15s linear;
}
.toast.showing { display: block; opacity: 0; }
.toast.show    { display: block; opacity: 1; }
.toast.hide    { display: block; opacity: 0; }
.toast-body    { padding: 0.6rem 0.85rem; font-size: 0.875rem; color: #fff; }
.d-flex        { display: flex; }
.align-items-center { align-items: center; }

/* ---- Flash alerts ---- */
.flash-success { background: rgba(25,135,84,0.1); border: 1px solid rgba(25,135,84,0.3); color: #0f5132; border-radius: 0.375rem; padding: 0.6rem 0.9rem; font-size: 0.875rem; margin-bottom: 1rem; }
.flash-danger  { background: rgba(220,53,69,0.1);  border: 1px solid rgba(220,53,69,0.3);  color: #842029; border-radius: 0.375rem; padding: 0.6rem 0.9rem; font-size: 0.875rem; margin-bottom: 1rem; }

/* ---- Form hint ---- */
.password-hint { font-size: 0.78rem; color: #6c757d; margin-top: 0.3rem; }

/* ================================================================
   TipTap editor — shared styles (admin.html + admin_pages.html)
   ================================================================ */

/* ---- Editor wrapper ---- */
#editor-wrap,
#page-editor-wrap {
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
}
#editor-wrap:focus-within,
#page-editor-wrap:focus-within {
  border-color: #c8963e;
  box-shadow: 0 0 0 0.2rem rgba(200,150,62,0.18);
}

/* ---- Toolbar ---- */
#tiptap-toolbar,
#page-tiptap-toolbar {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 0.2rem; padding: 0.45rem 0.65rem;
  background: #f8f9fa; border-bottom: 1px solid #dee2e6;
}
#tiptap-toolbar .btn,
#page-tiptap-toolbar .btn {
  padding: 0.18rem 0.45rem; font-size: 0.8rem; line-height: 1.4;
}
#tiptap-toolbar .btn.is-active,
#page-tiptap-toolbar .btn.is-active {
  background-color: #c8963e !important;
  border-color: #c8963e !important;
  color: #fff !important;
}
#tiptap-toolbar .vr,
#page-tiptap-toolbar .vr { align-self: stretch; margin: 0 0.15rem; }

/* ---- Format dropdown ---- */
#btn-format,
#p-btn-format {
  min-width: 108px; text-align: left;
  display: flex; align-items: center; justify-content: space-between; gap: 0.4rem;
}
.format-dropdown-menu .dropdown-item { font-size: 0.82rem; }
.format-dropdown-menu .dropdown-item[data-level="2"] { font-size: 1rem; font-weight: 700; }
.format-dropdown-menu .dropdown-item[data-level="3"] { font-size: 0.9rem; font-weight: 700; }
.format-dropdown-menu .dropdown-item[data-level="4"] { font-size: 0.82rem; font-weight: 600; }

/* ---- Color picker ---- */
.color-popover { min-width: 172px; }
.color-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 3px; }
.color-swatch {
  width: 18px; height: 18px; border-radius: 3px; cursor: pointer;
  border: 1px solid rgba(0,0,0,0.15);
  transition: transform 0.1s, box-shadow 0.1s;
}
.color-swatch:hover { transform: scale(1.25); box-shadow: 0 1px 4px rgba(0,0,0,0.3); }
#color-indicator,
#p-color-indicator {
  display: inline-block; width: 14px; height: 3px;
  border-radius: 2px; background: #000;
  transition: background 0.15s;
  position: absolute; bottom: 3px; left: 50%; transform: translateX(-50%);
}
#btn-color,
#p-btn-color { position: relative; }
#highlight-indicator,
#p-highlight-indicator {
  display: inline-block; width: 14px; height: 3px;
  border-radius: 2px; background: #ffff00;
  transition: background 0.15s;
  position: absolute; bottom: 3px; left: 50%; transform: translateX(-50%);
}
#btn-highlight,
#p-btn-highlight { position: relative; }

/* ---- Image alignment ---- */
.img-align-group .btn { padding: 0.18rem 0.35rem; }

/* ---- Table dropdown ---- */
.table-dropdown-menu { min-width: 175px; font-size: 0.82rem; }

/* ---- Severity box ---- */
.severity-node-view {
  display: flex; align-items: flex-start; gap: 0.65rem;
  border-radius: 0 0.4rem 0.4rem 0;
  padding: 0.7rem 1rem; margin: 0.75rem 0; cursor: text;
}
.severity-select {
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.07em;
  text-transform: uppercase; cursor: pointer;
  border: none; outline: none; border-radius: 0.25rem;
  padding: 0.2rem 0.45rem; flex-shrink: 0;
  appearance: none; -webkit-appearance: none;
}

/* ---- TipTap editable area ---- */
.tiptap {
  padding: 1rem 1.25rem;
  font-size: 0.95rem; outline: none;
}
.tiptap p { margin-bottom: 0.75rem; }
.tiptap h2 { font-size: 1.45rem; font-weight: 700; margin: 1.5rem 0 0.5rem; color: #08082e; }
.tiptap h3 { font-size: 1.2rem;  font-weight: 700; margin: 1.25rem 0 0.4rem; color: #08082e; }
.tiptap h4 { font-size: 1rem; font-weight: 600; margin: 1.25rem 0 0.4rem; padding-left: 0.75rem; border-left: 3px solid #c8963e; color: #1b2545; }
.tiptap img { max-width: 100%; height: auto; border-radius: 0.375rem; margin: 0.75rem 0; display: block; }
.tiptap a { color: #c8963e; }
.tiptap pre { background: #1b2545; color: #a0b4c8; border-radius: 0.375rem; padding: 0.75rem 1rem; font-size: 0.85em; overflow-x: auto; margin-bottom: 0.75rem; font-family: 'IBM Plex Mono', monospace; }
.tiptap code:not(pre code) { background: rgba(0,0,0,0.08); padding: 0.1em 0.35em; border-radius: 0.25rem; font-size: 0.9em; font-family: 'IBM Plex Mono', monospace; }
.tiptap .ioc { font-family: 'IBM Plex Mono', monospace; font-size: 0.85em; color: #1b2545; }
.tiptap hr { border-color: #dee2e6; margin: 1.5rem 0; }
.tiptap ul { list-style-type: disc; padding-left: 1.5rem; margin-bottom: 0.75rem; }
.tiptap ol { list-style-type: decimal; padding-left: 1.5rem; margin-bottom: 0.75rem; }
.tiptap li { margin-bottom: 0.2rem; }

/* Blockquote */
.tiptap blockquote {
  border-left: 4px solid #c8963e;
  background: rgba(200, 150, 62, 0.07);
  margin: 1rem 0; padding: 0.75rem 1.25rem;
  border-radius: 0 0.4rem 0.4rem 0;
  color: #495057; font-style: italic;
}
.tiptap blockquote p { margin-bottom: 0; }

/* Figure + Figcaption */
.tiptap figure { margin: 1.25rem 0; display: flow-root; }
.tiptap figure img { display: block; max-width: 100%; height: auto; border-radius: 0.375rem; margin: 0; }
.tiptap figure[data-align="center"] { text-align: center; margin-left: auto; margin-right: auto; }
.tiptap figure[data-align="left"]   { float: left;  margin: 0.5rem 1.5rem 0.5rem 0; max-width: 48%; }
.tiptap figure[data-align="right"]  { float: right; margin: 0.5rem 0 0.5rem 1.5rem; max-width: 48%; }
.tiptap figcaption {
  font-size: 0.8rem; color: #6c757d; font-style: italic;
  margin-top: 0.4rem; text-align: center; padding: 0 0.5rem;
  outline: none; min-height: 1.2em;
}
.tiptap figcaption:empty::before { content: 'Caption…'; color: #adb5bd; pointer-events: none; }

/* Table */
.tiptap table { border-collapse: collapse; width: 100%; margin: 0; font-size: 0.85rem; border: 1px solid #dee2e6; }
.tiptap td, .tiptap th { border: 1px solid #c0c0c0; padding: 0.2rem 0.45rem; min-width: 60px; vertical-align: middle; position: relative; line-height: 1.5; }
.tiptap th, .tiptap th * { background-color: #08082e; color: #ffffff !important; font-weight: 600; font-size: 0.85rem; }
.tiptap td { background-color: #ffffff; }
.tiptap tbody tr:nth-child(even) td { background-color: #f2f2f2; }
.tiptap tbody tr:hover td { background-color: rgba(200, 150, 62, 0.07); }
.tiptap .selectedCell { background: rgba(200, 150, 62, 0.12); }
.tiptap .column-resize-handle { position: absolute; right: -2px; top: 0; bottom: 0; width: 4px; background-color: #c8963e; pointer-events: none; }
.tableWrapper { overflow-x: auto; }

/* TOC node view */
.toc-node-view {
  border: 1px dashed #c8963e; border-radius: 0.4rem;
  background: rgba(200, 150, 62, 0.05);
  padding: 0.75rem 1rem; margin: 0.75rem 0;
  user-select: none; cursor: default;
}
.toc-node-view .toc-node-header {
  font-size: 0.8rem; font-weight: 600; color: #8a6520;
  text-transform: uppercase; letter-spacing: 0.06em;
  display: flex; align-items: center; gap: 0.4rem;
  margin-bottom: 0.5rem;
}
.toc-node-view .toc-preview { font-size: 0.8rem; color: #6c757d; }
.toc-node-view .toc-item { padding: 0.1rem 0; }
.toc-node-view .toc-level-2 { padding-left: 0; font-weight: 500; }
.toc-node-view .toc-level-3 { padding-left: 1rem; }
.toc-node-view .toc-level-4 { padding-left: 2rem; font-size: 0.75rem; }
.toc-node-view .toc-empty { font-style: italic; }

/* Placeholder */
.tiptap p.is-editor-empty:first-child::before {
  content: attr(data-placeholder);
  float: left; color: #adb5bd; pointer-events: none; height: 0;
}

/* IOC Block editor preview */
.tiptap .ioc-block { background:#fff; border-left:4px solid #08082e; border-radius:0 0.4rem 0.4rem 0; margin:0.75rem 0; overflow:hidden; box-shadow:0 1px 4px rgba(0,0,0,0.08); cursor:default; user-select:none; position:relative; }
.tiptap .ioc-block-header { background:#08082e; color:#fff; padding:0.3rem 0.75rem; font-family:'IBM Plex Mono',monospace; font-size:0.7rem; font-weight:600; text-transform:uppercase; letter-spacing:0.1em; display:flex; align-items:center; justify-content:space-between; }
.tiptap .ioc-block-header .btn-edit-ioc { font-size:0.68rem; padding:0.1rem 0.45rem; border:1px solid rgba(255,255,255,0.4); border-radius:0.25rem; background:transparent; color:#fff; cursor:pointer; }
.tiptap .ioc-block-header .btn-edit-ioc:hover { background:rgba(255,255,255,0.15); }
.tiptap .ioc-block-preview { padding:0.4rem 0.75rem; font-size:0.78rem; font-family:'IBM Plex Mono',monospace; color:#6c757d; }
.tiptap .ioc-block-preview table { width:100%; border-collapse:collapse; font-size:0.78rem; margin:0; }
.tiptap .ioc-block-preview table th, .tiptap .ioc-block-preview table td { padding:0.15rem 0.4rem; border-bottom:1px solid #e9ecef; vertical-align:middle; }
.tiptap .ioc-block-preview table th { background:#f8f9fa; color:#495057; font-weight:600; font-size:0.68rem; text-transform:uppercase; letter-spacing:0.05em; }
.tiptap .footnote-ref-editor { display:inline-flex; align-items:center; background:rgba(200,150,62,0.12); color:#c8963e; border:1px solid rgba(200,150,62,0.4); border-radius:3px; font-size:0.68rem; font-weight:700; padding:0 3px; cursor:pointer; font-family:'IBM Plex Mono',monospace; user-select:none; vertical-align:super; line-height:1.2; }
.tiptap .footnote-ref-editor:hover { background:rgba(200,150,62,0.25); }

/* ---- Per-editor size overrides ---- */
#editor-wrap .tiptap      { min-height: 520px; line-height: 1.3; }
#page-editor-wrap .tiptap { min-height: 480px; line-height: 1.5; }

/* ---- HTML source mode ---- */
#html-source,
#p-html-source {
  font-family: 'IBM Plex Mono', 'Courier New', monospace; font-size: 0.78rem;
  resize: vertical; border: 0; border-radius: 0; outline: none; display: none;
}
#html-source   { min-height: 560px; }
#p-html-source { min-height: 480px; }

#html-source-banner,
#p-html-source-banner {
  display: none;
  background: #fff3cd; border-bottom: 1px solid #ffc107;
  padding: 0.4rem 0.8rem; font-size: 0.8rem; color: #664d03;
}

/* ================================================================
   Admin — Articles editor specific
   ================================================================ */

/* Article table */
#admin-article-table    { font-size: 0.875rem; }
#admin-article-table th { font-weight: 600; color: #0a1520; background: #f8f9fa; white-space: nowrap; }
#admin-article-table td { vertical-align: middle; }

/* Preview modal */
#preview-body h2 { font-size: 1.6rem; font-weight: 700; color: #08082e; margin-bottom: 0.5rem; }
#preview-body h4 { font-size: 1rem; font-weight: 600; color: #1b2545; padding-left: 0.75rem; border-left: 3px solid #c8963e; margin-top: 1.75rem; margin-bottom: 0.6rem; }
#preview-body p, #preview-body li { line-height: 1.8; color: #343a40; margin-bottom: 0.75rem; }
#preview-body ul { list-style-type: disc; padding-left: 1.5rem; margin-bottom: 0.75rem; }
#preview-body ol { list-style-type: decimal; padding-left: 1.5rem; margin-bottom: 0.75rem; }
#preview-body table p, #preview-body table li { margin-bottom: 0; }
#preview-body table p:empty { display: none; }
#preview-body img { max-width: 100%; height: auto; border-radius: 0.375rem; margin: 0.75rem 0; display: block; }
#preview-body .article-meta { color: #6c757d; font-size: 0.875rem; }
#preview-body blockquote { border-left: 4px solid #c8963e; background: rgba(200,150,62,0.07); margin: 1rem 0; padding: 0.75rem 1.25rem; border-radius: 0 0.4rem 0.4rem 0; color: #495057; font-style: italic; }
#preview-body table { border-collapse: collapse !important; width: 100% !important; margin: 0; font-size: 0.85rem; }
#preview-body th, #preview-body td { padding: 0.2rem 0.45rem !important; border: 1px solid #c0c0c0 !important; vertical-align: middle !important; box-shadow: none !important; line-height: 1.5; }
#preview-body th, #preview-body th * { background-color: #08082e !important; color: #ffffff !important; font-weight: 600; font-size: 0.85rem; }
#preview-body td { background-color: #ffffff !important; color: #212529 !important; }
#preview-body tbody tr:nth-child(even) td { background-color: #f2f2f2 !important; }
#preview-body figure { margin: 1.25rem 0; display: flow-root; }
#preview-body figure img { display: block; max-width: 100%; height: auto; border-radius: 0.375rem; margin: 0; }
#preview-body figure[data-align="center"] { text-align: center; margin-left: auto; margin-right: auto; }
#preview-body figure[data-align="left"]   { float: left;  margin: 0.5rem 1.5rem 0.5rem 0; max-width: 48%; }
#preview-body figure[data-align="right"]  { float: right; margin: 0.5rem 0 0.5rem 1.5rem; max-width: 48%; }
#preview-body figcaption { font-size: 0.8rem; color: #6c757d; font-style: italic; margin-top: 0.4rem; text-align: center; }

/* Popover */
.popover { background:#f0fdf4; border:1px solid #bbf7d0; border-radius:0.375rem; box-shadow:0 4px 12px rgba(0,0,0,0.12); width:max-content; max-width:none; font-size:0.72rem; z-index:1070; }
.popover-body { padding:0.6rem 0.75rem; color:#343a40; }
.popover-arrow::before, .popover-arrow::after { border-color:transparent; }

/* Related articles tree */
.related-tree-branch { border-bottom:1px solid #e9ecef; }
.related-tree-branch:last-child { border-bottom:none; }
.related-tree-branch > summary { list-style:none; }
.related-tree-branch > summary::-webkit-details-marker { display:none; }
.related-tree-category { display:flex; align-items:center; gap:0.4rem; padding:0.35rem 0.75rem; cursor:pointer; background:#f8f9fa; font-size:0.75rem; font-weight:700; color:#1b2545; text-transform:uppercase; letter-spacing:0.05em; user-select:none; }
.related-tree-category:hover { background:#eef0f5; }
.related-tree-chevron { font-size:0.62rem; transition:transform 0.15s; flex-shrink:0; }
details.related-tree-branch[open] .related-tree-chevron { transform:rotate(90deg); }
.related-tree-count { margin-left:auto; font-size:0.68rem; color:#6c757d; font-weight:400; background:#e9ecef; padding:0.05rem 0.45rem; border-radius:1rem; }
.related-tree-leaves { padding:0.15rem 0; }
.related-check-item { display:flex; align-items:center; gap:0.5rem; padding:0.28rem 0.75rem 0.28rem 1.5rem; cursor:pointer; margin:0; font-weight:normal; transition:background 0.1s; }
.related-check-item:hover { background:#f5f5fa; }
.related-check-item + .related-check-item { border-top:1px solid #f0f0f0; }
.related-check-item input[type="checkbox"] { flex-shrink:0; margin:0; cursor:pointer; }
.related-check-title { font-size:0.82rem; color:#212529; flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.related-check-date  { font-size:0.75rem; color:#6c757d; white-space:nowrap; flex-shrink:0; }

/* ================================================================
   Admin — Stats page
   ================================================================ */

.stats-wrap { padding:1.25rem 1rem 3rem; }

.stat-cards { display:grid; grid-template-columns:repeat(2,1fr); gap:0.875rem; margin-bottom:1.25rem; }
@media (min-width:640px)  { .stat-cards { grid-template-columns:repeat(3,1fr); } }
@media (min-width:1024px) { .stat-cards { grid-template-columns:repeat(6,1fr); } }
.stat-card { background:#fff; border:1px solid #dee2e6; border-radius:0.5rem; box-shadow:0 1px 4px rgba(0,0,0,.06); padding:1.1rem 0.75rem 1rem; text-align:center; }
.stat-icon   { font-size:1.25rem; color:#c8963e; display:block; margin-bottom:0.4rem; }
.stat-number { font-size:1.75rem; font-weight:700; color:#08082e; line-height:1; margin-bottom:0.3rem; font-family:'IBM Plex Mono',monospace; }
.stat-label  { font-size:0.67rem; text-transform:uppercase; letter-spacing:0.09em; color:#6c757d; font-weight:600; }
.stat-sub    { font-size:0.7rem; color:#6c757d; margin-top:0.3rem; }
.stat-delta  { display:inline-block; font-size:0.67rem; font-weight:700; padding:0.1rem 0.4rem; border-radius:0.9rem; margin-top:0.35rem; }
.delta-up    { background:rgba(25,135,84,.12); color:#0a6640; }
.delta-down  { background:rgba(220,53,69,.12);  color:#9e1c28; }
.delta-flat  { background:rgba(108,117,125,.12); color:#4a5160; }

.section-row { display:grid; gap:1rem; margin-bottom:1rem; }
.row-2col { grid-template-columns:1fr 1fr; }
.row-3col { grid-template-columns:1fr 1fr 1fr; }
@media (max-width:900px) { .row-2col, .row-3col { grid-template-columns:1fr; } }

.bar-chart-wrap { padding:1rem 1.25rem 0; }
.bar-chart { display:flex; align-items:flex-end; gap:3px; height:80px; }
.bar-col  { flex:1; display:flex; flex-direction:column; align-items:center; justify-content:flex-end; height:100%; }
.bar-fill { width:100%; background:#c8963e; border-radius:2px 2px 0 0; min-height:2px; transition:background .15s; cursor:default; }
.bar-fill:hover { background:#08082e; }
.bar-chart-x { display:flex; gap:3px; padding:0.3rem 1.25rem 0.85rem; }
.bar-x-item  { flex:1; font-size:0.53rem; color:#6c757d; text-align:center; white-space:nowrap; overflow:hidden; }

.cat-row      { display:flex; align-items:center; gap:0.6rem; margin-bottom:0.6rem; }
.cat-name     { width:7.5rem; flex-shrink:0; font-size:0.8rem; font-weight:500; color:#212529; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.cat-bar-track { flex:1; height:8px; background:#f0ede8; border-radius:4px; overflow:hidden; }
.cat-bar-fill  { height:100%; background:#1b2545; border-radius:4px; }
.cat-count    { width:2.5rem; text-align:right; font-family:'IBM Plex Mono',monospace; font-size:0.75rem; color:#6c757d; flex-shrink:0; }

.mini-table { width:100%; border-collapse:collapse; font-size:0.8rem; }
.mini-table th { font-size:0.65rem; text-transform:uppercase; letter-spacing:0.07em; font-weight:600; color:#6c757d; padding:0.4rem 0.75rem; border-bottom:1px solid #dee2e6; background:#f8f9fa; text-align:left; white-space:nowrap; }
.mini-table td { padding:0.42rem 0.75rem; border-bottom:1px solid #f0ede8; vertical-align:middle; color:#212529; }
.mini-table tbody tr:last-child td { border-bottom:none; }
.mini-table tbody tr:hover td { background:rgba(0,0,0,.018); }

.panel-body  { padding:1rem 1.25rem; }
.panel-empty { padding:2rem; text-align:center; color:#6c757d; font-size:0.85rem; }
.section-mb  { margin-bottom:1rem; }
.mono { font-family:'IBM Plex Mono',monospace; }

/* ================================================================
   Admin — Images page
   ================================================================ */

.image-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  padding: 1.25rem;
}
@media (min-width: 640px)  { .image-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .image-grid { grid-template-columns: repeat(4, 1fr); } }

.image-card {
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
  overflow: hidden;
  background: #fff;
  display: flex;
  flex-direction: column;
}
.image-thumb {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  cursor: pointer;
  display: block;
  transition: opacity 0.15s;
}
.image-thumb:hover { opacity: 0.85; }
.image-info {
  padding: 0.5rem 0.65rem;
  font-size: 0.75rem;
  color: #6c757d;
  border-top: 1px solid #f0f0f0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.image-name {
  font-weight: 600;
  color: #212529;
  word-break: break-all;
  font-size: 0.7rem;
  font-family: 'IBM Plex Mono', monospace;
}
.image-actions { margin-top: 0.4rem; }
