:root {
    --wine: #6b1020;
    --wine-2: #8b1e2d;
    --gold: #d6b344;
    --gold-soft: #f6efd4;
    --ink: #182332;
    --muted: #647182;
    --paper: #ffffff;
    --line: #dfe5ea;
    --surface: #f4f6f8;
    --teal: #0d5f73;
}

* {
    box-sizing: border-box;
}

html,
body {
    overflow-x: hidden;
}

body {
    margin: 0;
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
    background: var(--surface);
}

.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.pdf-list-page {
    font-family: 'Poppins', Arial, Helvetica, sans-serif;
}

a {
    color: inherit;
}

img {
    max-width: 100%;
}

button,
input,
select,
textarea {
    font: inherit;
}

.site-shell {
    min-height: 100vh;
}

.content.container {
    width: min(1180px, calc(100% - 28px)) !important;
    max-width: 1180px !important;
    margin: 32px auto 54px !important;
}

.site-footer {
    margin-top: auto;
    background: #111922;
    color: #d9dde2;
    border-top: 4px solid var(--gold);
    padding: 26px 16px;
}

.site-footer-inner {
    width: min(1180px, 100%);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
    font-size: 14px;
}

.site-footer strong {
    color: #fff;
}

.gov-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    background: #f8fafb;
    border-bottom: 1px solid #d9e0e6;
}

.gov-topbar:after {
    content: "";
    display: block;
    height: 3px;
    background: var(--wine);
}

.gov-topbar-inner {
    width: min(1180px, calc(100% - 28px));
    min-height: 78px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 250px;
    color: var(--wine);
    text-decoration: none;
}

.brand-mark {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    color: #fff;
    background: var(--wine);
    border: 2px solid var(--gold);
    border-radius: 8px;
}

.brand-copy {
    min-width: 0;
}

.brand strong,
.brand small {
    display: block;
    line-height: 1.1;
}

.brand strong {
    font-size: 18px;
}

.brand small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
}

.top-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    min-width: 0;
}

.top-link,
.admin-shortcut {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 13px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 900;
    font-size: 13px;
    white-space: nowrap;
    transition: transform .18s ease, background .18s ease, border-color .18s ease;
}

.top-link {
    color: #243141;
    background: #fff;
    border: 1px solid #d7dce3;
}

.top-link:hover {
    color: var(--wine);
    border-color: var(--gold);
    transform: translateY(-1px);
}

.admin-shortcut {
    color: #fff;
    background: var(--wine);
    border: 1px solid var(--gold);
}

.admin-shortcut:hover {
    background: var(--wine-2);
    transform: translateY(-1px);
}

.hero-copy,
.hero-search,
.hero-metrics,
.section-heading,
.book-toolbar,
.result-toolbar,
.panel-head,
.catalog-toolbar,
.users-toolbar {
    position: relative;
    z-index: 1;
}

.civic-hero,
.book-cover,
.search-cover,
.global-search {
    position: relative;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-top: -32px;
    padding: clamp(28px, 5vw, 72px) max(clamp(20px, 6vw, 86px), calc((100vw - 1180px) / 2 + 24px));
    color: #fff;
    background: var(--wine);
    border-bottom: 5px solid var(--gold);
}

.civic-hero {
    min-height: clamp(420px, 60vh, 680px);
    display: grid;
    align-content: end;
    gap: 20px;
}

.civic-hero h1,
.book-cover h1,
.search-cover h1 {
    margin: 8px 0;
    max-width: 860px;
    line-height: 1;
    letter-spacing: 0;
}

.civic-hero h1 {
    font-size: clamp(40px, 7vw, 82px);
}

.civic-hero p,
.book-cover p,
.search-cover p {
    max-width: 820px;
    margin: 0;
    color: #f4f6f8;
    line-height: 1.55;
}

.eyebrow,
.section-heading span,
.recent-link span,
.index-title span,
.book-toolbar span,
.page-heading span,
.result-toolbar span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--gold);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.hero-search,
.search-again,
.book-search,
.local-filter {
    display: grid;
    min-height: 46px;
    align-items: center;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.hero-search {
    grid-template-columns: 52px minmax(0, 1fr) 132px;
    width: min(820px, 100%);
    min-height: 60px;
}

.hero-search > i,
.search-again i,
.book-search i,
.local-filter i {
    color: var(--wine);
    text-align: center;
}

.hero-search input,
.search-again input,
.book-search input,
.local-filter input {
    min-width: 0;
    width: 100%;
    height: 46px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--ink);
}

.hero-search input {
    height: 60px;
    font-size: 16px;
}

.hero-search button,
.search-again button,
.result-entry a,
.book-document a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 13px;
    color: #fff;
    background: var(--wine);
    border: 0;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 900;
    white-space: nowrap;
    cursor: pointer;
}

.hero-search button {
    height: 60px;
}

.hero-search button:hover,
.search-again button:hover,
.result-entry a:hover,
.book-document a:hover {
    background: var(--wine-2);
}

.hero-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    width: min(820px, 100%);
}

.hero-metrics div,
.catalog-panel,
.recent-panel,
.result-index,
.result-pages,
.book-index,
.book-pages,
.empty-book,
.manual-page-shell,
.manual-dependency,
.admin-card,
.stat-card,
.stats-alert,
.catalog-tab,
.catalog-stat,
.user-stat-card,
.metric-card,
.profile-card,
.profile-form-panel,
.denied-card,
.form-card,
.form-section,
.current-file,
.upload-zone,
.users-panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.hero-metrics div {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-height: 74px;
    padding: 12px;
}

.hero-metrics i {
    grid-row: span 2;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: #fff;
    background: var(--gold);
    border-radius: 8px;
}

.hero-metrics span,
.hero-metrics strong {
    min-width: 0;
}

.hero-metrics span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.hero-metrics strong {
    color: var(--ink);
    font-size: 17px;
}

.portal-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 350px);
    gap: 20px;
    align-items: start;
    margin-top: 22px;
}

.catalog-panel,
.recent-panel,
.result-pages,
.book-pages,
.manual-page-shell,
.admin-card,
.users-panel,
.profile-form-panel,
.form-card,
.denied-card,
.stat-card,
.stats-alert,
.catalog-tab,
.catalog-stat,
.user-stat-card,
.metric-card {
    box-shadow: 0 1px 2px rgba(24,35,50,.05);
}

.catalog-panel,
.recent-panel,
.result-pages,
.book-pages,
.manual-page-shell,
.users-panel,
.form-card,
.profile-form-panel {
    padding: clamp(18px, 3vw, 24px);
}

.section-heading,
.book-toolbar,
.result-toolbar,
.catalog-toolbar,
.users-toolbar,
.panel-head,
.index-title,
.manual-panel-head,
.manual-dependency-head,
.page-heading {
    padding-bottom: 14px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--line);
}

.section-heading h2,
.index-title h2,
.book-toolbar h2,
.result-toolbar h2,
.catalog-toolbar h2,
.users-toolbar h2,
.panel-head h2,
.manual-panel-head h2,
.manual-dependency-head h2 {
    margin: 4px 0 0;
    color: var(--wine);
    line-height: 1.15;
}

.section-heading h2 {
    font-size: clamp(22px, 3vw, 30px);
}

.catalog-grid,
.recent-list,
.year-list,
.result-list,
.document-book-list,
.manual-dependency-list,
.permissions-grid,
.users-summary,
.stats-grid,
.stats-dashboard,
.stats-tables,
.metrics-grid {
    display: grid;
    gap: 12px;
}

.catalog-item,
.recent-link,
.year-tab,
.manual-tab,
.book-document,
.result-entry,
.permission-card,
.mini-doc,
.account-chip,
.perm-chip {
    border: 1px solid var(--line);
    border-radius: 8px;
}

.catalog-item,
.recent-link,
.book-document,
.result-entry,
.permission-card,
.mini-doc,
.catalog-tab,
.catalog-stat,
.user-stat-card,
.metric-card {
    transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.catalog-item:hover,
.recent-link:hover,
.book-document:hover,
.result-entry:hover,
.permission-card:hover,
.mini-doc:hover,
.catalog-tab:hover,
.user-stat-card:hover,
.metric-card:hover,
.catalog-stat:hover {
    border-color: var(--gold);
    transform: translateY(-2px);
}

.catalog-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.catalog-item {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) 34px;
    gap: 14px;
    align-items: center;
    min-height: 112px;
    padding: 16px;
    color: var(--ink);
    text-decoration: none;
    background: #fff;
    border-left: 5px solid var(--wine);
}

.catalog-icon,
.page-mark,
.entry-mark,
.manual-type-icon,
.brand-mark,
.admin-brand-icon,
.metric-icon,
.stat-card i,
.user-stat-card i,
.catalog-tab i,
.catalog-stat i,
.permission-card input:checked + span:before {
    display: grid;
    place-items: center;
}

.catalog-icon {
    width: 52px;
    height: 52px;
    font-size: 21px;
    color: #fff;
    background: var(--wine);
    border: 2px solid var(--gold);
    border-radius: 8px;
}

.catalog-content strong,
.catalog-content small,
.recent-link strong,
.recent-link small,
.book-document-info h3,
.book-document-info p,
.entry-info h3,
.entry-info p,
.user-name-block strong,
.user-name-block span,
.profile-info h2,
.profile-info p,
.profile-info span,
.current-file span,
.current-file a {
    display: block;
}

.catalog-content strong,
.recent-link strong {
    color: var(--ink);
    font-size: 16px;
    line-height: 1.3;
}

.catalog-content small,
.recent-link small {
    margin-top: 6px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.catalog-open {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    color: var(--wine);
    background: #f6efd4;
    border-radius: 8px;
}

.recent-link {
    display: block;
    padding: 14px;
    color: var(--ink);
    text-decoration: none;
    background: #fff;
}

.recent-link span,
.page-heading span,
.book-toolbar span,
.result-toolbar span {
    color: var(--gold);
}

.empty-panel,
.empty-book {
    min-height: 170px;
    display: grid;
    place-items: center;
    gap: 8px;
    color: var(--muted);
    text-align: center;
    padding: 24px;
}

.empty-panel {
    border: 1px dashed var(--gold);
}

.empty-panel i,
.empty-book i,
.manual-empty i {
    color: var(--wine);
    font-size: 30px;
}

.book-shell,
.result-book,
.profile-layout,
.stats-grid,
.stats-dashboard,
.stats-tables {
    display: grid;
    gap: 20px;
    align-items: start;
}

.book-shell,
.result-book {
    grid-template-columns: 240px minmax(0, 1fr);
    margin-top: 22px;
}

.book-index,
.result-index {
    position: sticky;
    top: 104px;
    padding: 18px;
    border-left: 7px solid var(--wine);
}

.book-pages,
.result-pages {
    min-height: 520px;
}

.book-toolbar,
.result-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 16px;
    align-items: end;
}

.search-again,
.book-search,
.local-filter {
    grid-template-columns: 42px minmax(0, 1fr) 96px;
}

.search-again {
    width: min(420px, 100%);
}

.search-cover {
    min-height: clamp(300px, 40vh, 460px);
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) minmax(280px, 420px);
    gap: 24px;
    align-items: end;
}

.back-link {
    align-self: start;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    background: var(--wine);
    border: 1px solid var(--gold);
    border-radius: 6px;
    padding: 10px 13px;
    text-decoration: none;
    font-weight: 900;
}

.search-cover h1 {
    font-size: clamp(34px, 6vw, 68px);
}

.search-cover p {
    margin-top: 4px;
}

.result-index,
.result-pages {
    background: #fff;
}

.year-tab,
.manual-tab {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    min-height: 46px;
    padding: 10px 12px;
    color: var(--ink);
    background: #fff;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}

.year-tab small,
.manual-tab small {
    min-width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: #f6efd4;
    color: var(--wine);
}

.year-tab:hover,
.year-tab.active,
.manual-tab:hover,
.manual-tab.active {
    color: var(--wine);
    border-color: var(--gold);
    background: #f6efd4;
}

.year-page,
.manual-panel {
    display: none;
}

.year-page.active,
.manual-panel.active {
    display: block;
    animation: pageIn .18s ease;
}

@keyframes pageIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.page-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    margin-bottom: 12px;
    background: #f6efd4;
    border: 1px solid #eadfae;
    border-radius: 8px;
}

.page-heading strong {
    color: var(--wine);
    font-size: 24px;
}

.book-document,
.result-entry {
    display: grid;
    gap: 14px;
    align-items: center;
    padding: 14px;
    background: #fff;
}

.book-document {
    grid-template-columns: 50px minmax(0, 1fr) auto;
    border-left: 5px solid var(--wine);
}

.result-entry {
    grid-template-columns: 48px minmax(0, 1fr) auto;
}

.page-mark,
.entry-mark,
.manual-type-icon {
    width: 48px;
    height: 48px;
    color: #fff;
    background: var(--wine);
    border: 2px solid var(--gold);
    border-radius: 8px;
}

.manual-type-icon {
    width: 62px;
    height: 62px;
    font-size: 25px;
}

.book-document-info h3,
.entry-info h3 {
    margin: 0 0 8px;
    color: var(--ink);
    font-size: 16px;
    line-height: 1.35;
}

.book-document-info p,
.entry-info p {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.doc-badge,
.event-chip,
.badge-type {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 4px 9px;
    font-weight: 900;
}

.doc-badge,
.event-chip {
    color: var(--wine);
    background: #f6efd4;
    border: 1px solid #eadfae;
}

.entry-info mark,
mark {
    background: #f4e2a2;
    color: #271a00;
    padding: 2px 4px;
    border-radius: 4px;
}

.book-count {
    display: grid;
    place-items: center;
    gap: 7px;
    padding: 18px;
    text-align: center;
    background: #fff;
    border: 1px solid var(--gold);
    border-radius: 8px;
}

.book-count i,
.book-count strong {
    color: var(--gold);
}

.book-count strong {
    display: block;
    font-size: 34px;
    line-height: 1;
}

.book-count span {
    color: #fff;
}

.manual-page-shell {
    margin-top: 22px;
}

.manual-toolbar {
    margin-bottom: 18px;
}

.manual-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.manual-panel-head,
.manual-dependency,
.profile-cover,
.admin-page-title,
.login-card,
.login-institution,
.header,
.card,
.filter-box {
    background: #fff;
}

.manual-panel-head {
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 18px;
    margin-bottom: 18px;
    border: 1px solid var(--line);
}

.manual-panel-head h2 {
    font-size: clamp(22px, 3vw, 28px);
}

.manual-panel-head p,
.manual-dependency-head span:not(.manual-type-icon),
.panel-head small,
.muted,
.catalog-muted,
.recent-link small,
.profile-info p,
.profile-info span,
.user-name-block span,
.loading-text {
    color: var(--muted);
}

.manual-dependency {
    padding: 14px;
    border: 1px solid var(--line);
}

.manual-dependency-head {
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
}

.manual-dependency-head h2 {
    font-size: clamp(20px, 3vw, 26px);
}

.manual-dependency-list {
    gap: 16px;
}

.empty-book {
    min-height: 220px;
    margin-top: 22px;
    border: 1px solid var(--line);
}

.login-shell {
    width: min(980px, 100%);
    display: grid;
    grid-template-columns: minmax(0, 1fr) 430px;
    gap: 28px;
    align-items: stretch;
}

.login-institution {
    position: relative;
    min-height: 520px;
    color: #fff;
    background: var(--wine);
    border: 1px solid var(--gold);
    border-radius: 8px;
    padding: 34px;
    overflow: hidden;
}

.login-institution span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid var(--gold);
    border-radius: 999px;
    color: var(--gold-soft);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

.login-institution h2 {
    max-width: 540px;
    margin: 24px 0 12px;
    font-size: 42px;
    line-height: 1.05;
    font-weight: 900;
}

.login-institution p {
    max-width: 520px;
    color: #f4f6f8;
    font-size: 17px;
    margin: 0;
}

.login-points {
    position: absolute;
    left: 34px;
    right: 34px;
    bottom: 34px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.login-point {
    padding: 14px;
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    border: 1px solid var(--line);
}

.login-point i {
    color: var(--gold);
    margin-bottom: 8px;
}

.login-point strong {
    display: block;
    font-size: 13px;
    line-height: 1.25;
}

.login-card {
    width: 100%;
    max-width: 430px;
    border-top: 7px solid var(--gold);
    border-radius: 8px;
    overflow: hidden;
}

.login-header {
    padding: 28px 28px 12px;
    color: var(--wine);
}

.login-header h1 {
    font-size: 25px;
    font-weight: 900;
    margin: 0;
}

.login-header p {
    color: var(--muted);
    margin: 8px 0 0;
}

.login-body {
    padding: 18px 28px 28px;
}

.form-label {
    color: var(--wine);
    font-weight: 700;
}

.form-control {
    border-radius: 6px;
    padding: 12px;
    min-height: 48px;
    border-color: #d7dce3;
}

.form-control:focus,
.form-select:focus,
.search-again input:focus,
.book-search input:focus,
.local-filter input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 .2rem rgba(214,179,68,.18);
    outline: 0;
}

.btn-login,
.btn-primary,
.btn-save,
.btn-admin-primary {
    background: var(--wine);
    border-color: var(--wine);
    color: #fff;
    border-radius: 6px;
    font-weight: 800;
}

.btn-login:hover,
.btn-primary:hover,
.btn-save:hover,
.btn-admin-primary:hover {
    background: var(--wine-2);
    border-color: var(--wine-2);
    color: #fff;
}

.btn-success,
.btn-admin-gold {
    background: var(--gold);
    border-color: var(--gold);
    color: #241900;
    font-weight: 800;
    border-radius: 6px;
}

.btn-warning {
    background: #f1c85b;
    border-color: #f1c85b;
    color: #3a2600;
    font-weight: 800;
}

.btn-danger {
    background: #9f1d2c;
    border-color: #9f1d2c;
    font-weight: 800;
}

.back-link {
    color: var(--wine);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    text-decoration: none;
    font-weight: 700;
}

.header {
    background: var(--wine);
    color: #fff;
    padding: 15px;
    border-bottom: 4px solid var(--gold);
}

.accordion-button {
    background-color: #fff;
    color: var(--wine);
    border-left: 5px solid var(--gold);
    font-weight: bold;
}

.accordion-button:not(.collapsed) {
    background-color: var(--wine);
    color: #fff;
}

.accordion-button:focus {
    box-shadow: none;
}

.accordion-body {
    background-color: #f8fafb;
}

.card-doc {
    border-left: 4px solid var(--wine);
    border-radius: 8px;
    background: #fff;
    margin-bottom: 10px;
}

.card-doc:hover {
    box-shadow: 0 3px 10px rgba(0,0,0,.08);
}

.search-box input {
    border-radius: 30px;
    padding: 12px;
}

.search-box button {
    border-radius: 30px;
    background: var(--wine);
    border: none;
}

.filter-box {
    border-left: 4px solid var(--gold);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 16px;
}

.filter-box a {
    color: var(--wine);
    text-decoration: none;
}

.footer {
    text-align: center;
    padding: 15px;
    background: var(--wine);
    color: #fff;
    margin-top: 30px;
    font-size: 14px;
}

#loader {
    position: fixed;
    inset: 0;
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
    max-width: 320px;
    padding: 24px;
}

.loader-logo {
    width: 250px;
    max-width: 90%;
    margin-bottom: 20px;
}

.loading-animation {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 10px auto;
}

.loading-animation div {
    width: 15px;
    height: 12px;
    border-radius: 3px;
    animation: loadingEffect 1.5s infinite ease-in-out;
    background: var(--wine);
}

.loading-animation div:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-animation div:nth-child(3) {
    animation-delay: 0.4s;
}

.loading-animation div:nth-child(4) {
    animation-delay: 0.6s;
}

@keyframes loadingEffect {
    0%, 100% { transform: scaleY(1); opacity: 0.6; }
    50% { transform: scaleY(2); opacity: 1; }
}

.loading-text {
    font-size: 18px;
    font-weight: bold;
    margin-top: 10px;
}

.pdf-list-page {
    width: min(1200px, calc(100% - 28px));
    margin: 0 auto;
}

@media (max-width: 1080px) {
    .login-shell,
    .portal-layout,
    .book-shell,
    .result-book,
    .profile-layout,
    .stats-grid,
    .stats-dashboard,
    .stats-tables {
        grid-template-columns: 1fr;
    }

    .login-points {
        position: relative;
        left: auto;
        right: auto;
        bottom: auto;
        margin-top: 24px;
    }
}

@media (max-width: 880px) {
    .gov-topbar-inner {
        min-height: auto;
        align-items: flex-start;
        flex-direction: column;
        padding: 14px 0;
    }

    .brand {
        min-width: 0;
        width: 100%;
    }

    .top-actions {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 5px;
        justify-content: flex-start;
        scrollbar-width: thin;
    }

    .top-link,
    .admin-shortcut {
        min-width: max-content;
    }
}

@media (max-width: 760px) {
    .content.container {
        width: calc(100% - 20px) !important;
        margin-top: 20px !important;
    }

    .site-footer-inner,
    .section-heading,
    .catalog-toolbar,
    .users-toolbar,
    .panel-head {
        display: block;
    }

    .hero-search,
    .search-again,
    .book-toolbar,
    .result-toolbar {
        grid-template-columns: 42px minmax(0, 1fr);
    }

    .hero-search button,
    .search-again button,
    .result-entry a,
    .book-document a {
        width: 100%;
    }

    .catalog-grid,
    .permissions-grid,
    .users-summary,
    .metrics-grid,
    .stats-grid,
    .stats-dashboard,
    .stats-tables {
        grid-template-columns: 1fr;
    }

    .book-shell,
    .result-book {
        grid-template-columns: 1fr;
    }

    .book-index,
    .result-index {
        position: static;
    }

    .book-toolbar,
    .result-toolbar,
    .book-document,
    .result-entry,
    .manual-panel-head,
    .manual-dependency-head,
    .catalog-item {
        display: block;
    }

    .book-search,
    .local-filter {
        width: 100%;
        margin-top: 12px;
    }

    .book-document a,
    .result-entry a {
        margin-top: 12px;
    }

    .page-mark,
    .entry-mark {
        margin-bottom: 10px;
    }
}

@media (max-width: 620px) {
    .login-institution {
        padding: 24px;
        min-height: auto;
    }

    .login-institution h2 {
        font-size: 30px;
    }

    .login-points {
        grid-template-columns: 1fr;
    }

    .search-cover,
    .book-cover,
    .civic-hero {
        padding: 22px 16px;
    }

    .search-cover h1,
    .book-cover h1,
    .civic-hero h1 {
        font-size: 30px;
    }
}

@media (max-width: 430px) {
    .content.container {
        width: calc(100% - 16px) !important;
    }

    .catalog-item {
        grid-template-columns: 48px minmax(0, 1fr);
    }

    .catalog-open {
        grid-column: 1 / -1;
        width: 100%;
    }
}
