body { font-family: "Inter", "Segoe UI", Roboto, Arial, sans-serif; background: #f6f8fb; color: #1c2733; }
/* White header band: large centered logo + title in the logo's navy. */
.app-header { display: block; width: 100%; flex: 0 0 auto;
              background: #ffffff; text-align: center;
              padding: 20px 0 14px; z-index: 1030;
              box-shadow: 0 1px 3px rgba(28, 34, 82, 0.12); }
.app-header .app-logo { max-width: 100%; width: auto; height: auto; max-height: 160px;
                        display: block; margin: 0 auto 6px auto; }
.app-header .app-title { color: #1c2252; font-size: 28px; letter-spacing: 2px; font-weight: 600;
                         line-height: 1.2; }
.app-header .app-mail { display: inline-block; margin-top: 6px; color: #14479a; font-size: 20px;
                        text-decoration: none; }
.app-header .app-mail:hover { color: #d12929; text-decoration: underline; }
.app-header .app-mail:focus { color: #14479a; text-decoration: underline; }
/* Navbar in the logo's dark navy, white text; dropdowns keep readable dark text. */
.navbar { background: #1c2252 !important; flex: 0 0 auto; margin-bottom: 0;
          border: none; }
.navbar .navbar-nav { display: flex; justify-content: center; width: 100%; }
.navbar .container, .navbar .container-fluid { justify-content: center; }
.navbar .navbar-collapse { justify-content: center; }
.navbar .navbar-brand, .navbar .nav-link,
.navbar .navbar-nav > li > a, .navbar .nav > li > a { color: #ffffff !important; }
.navbar .navbar-nav > li > a:hover, .navbar .nav > li > a:hover,
.navbar .navbar-nav > li > a:focus, .navbar .nav > li > a:focus {
          color: #ffffff !important; background-color: #14479a; }
.navbar .nav-link.active, .navbar .navbar-nav > li.active > a,
.navbar .nav > li.active > a { background: #14479a; border-radius: 6px; color: #ffffff !important; }
.navbar .dropdown-menu > li > a { color: #1c2733; }
.navbar .dropdown-menu > li > a:hover, .navbar .dropdown-menu > li > a:focus {
          background-color: #e7f0fa; color: #1c2252; }
.navbar .icon-bar { background-color: #ffffff; }
/* Category cells (Тематика / Коды специальности ВАК / Категории ВАК, Было / Стало)
   hold newline-separated values and must show one value per line. */
table.dataTable td.dt-multiline, table.dataTable th.dt-multiline {
          white-space: pre-line; word-break: normal; overflow-wrap: break-word; }
.card { border: none; border-radius: 12px; box-shadow: 0 1px 4px rgba(16, 42, 67, 0.12); background: #fff; }
.section-table { background: #fff; border-radius: 12px; padding: 12px; }
.metric-chip { display: inline-block; padding: 2px 10px; margin: 2px; border-radius: 999px;
               background: #e7f0fa; color: #0b3d6b; font-size: 12px; }
.metric-chip.former { background: #e3e5e8; color: #5c6670; }
.src-badge { display: inline-block; padding: 2px 8px; margin: 2px; border-radius: 4px;
             font-size: 12px; color: #fff; line-height: 1.45; vertical-align: middle;
             text-decoration: none; }
.status-badge { display: inline-block; padding: 6px 16px; margin: 2px 0; border-radius: 6px;
                font-size: 16px; font-weight: 600; color: #fff; line-height: 1.4; }
.status-ok { background-color: #2e7d32; }
.status-banned { background-color: #c62828; }
.badge-row { margin: 6px 0 10px 0; }
.card-front-badges { margin: 0 0 10px 0; }
.btn-primary { background: #0b3d6b; border-color: #0b3d6b; }
.table.dataTable { font-size: 14px; }

/* Mobile header (DES-01): never wider than the screen, compact. */
@media (max-width: 768px) {
  .app-header { padding: 10px 16px 8px; }
  .app-header .app-logo { max-height: 64px; }
  .app-header .app-mail { font-size: 14px; margin-top: 4px; }
}
/* Hidden but accessible heading (DES-01). */
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* Banned journal cards (BUG-04): visible in «Все журналы», clearly marked. */
.card-banned { border-left: 4px solid #c62828; background: #fff5f5; }
.card-banned .card-title { color: #6b2a2a; }

/* BRW-33: bslib (BS5) renders the BS3 toggle markup (button.navbar-toggle > span.icon-bar x3)
   without any BS3 styles: draw the hamburger ourselves. */
.navbar .navbar-toggle { background: transparent; border: 1px solid rgba(255, 255, 255, 0.6);
                         border-radius: 6px; padding: 9px 10px; margin: 6px 12px 6px auto;
                         line-height: 0; cursor: pointer; }
.navbar .navbar-toggle:focus { outline: 2px solid rgba(255, 255, 255, 0.8); outline-offset: 2px; }
.navbar .navbar-toggle .icon-bar { display: block; width: 22px; height: 2px; border-radius: 1px;
                                   background-color: #ffffff; }
.navbar .navbar-toggle .icon-bar + .icon-bar { margin-top: 4px; }
/* BRW-33: wide tables scroll inside their own box, never the whole page. */
.section-table { overflow-x: auto; }
.modal-body { overflow-x: auto; }

/* BRW-33: any DataTable wider than its box scrolls inside its own wrapper (DT's scrollX is not
   used: its resize handler throws while a table is being redrawn). */
div.dataTables_wrapper { overflow-x: auto; max-width: 100%; }
.html-widget.datatables { max-width: 100%; }
