﻿.catalog-hero {
    padding: 1.8rem;
    border-radius: 1.7rem;
    background:
        linear-gradient(135deg, rgba(17, 56, 42, 0.94), rgba(46, 114, 86, 0.88)),
        url('/img/banner.png') center/cover;
    color: #fff;
    box-shadow: 0 18px 45px rgba(17, 56, 42, 0.18);
}

.catalog-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.42rem 0.8rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #f5dc9a;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.catalog-hero h1 {
    margin: 0.95rem 0 0.6rem;
    font-size: clamp(1.9rem, 4vw, 2.8rem);
    font-weight: 800;
    color: #ffffff;
}

.catalog-hero p {
    max-width: 760px;
    margin: 0;
    color: rgba(255, 255, 255, 0.84);
}

.catalog-hero,
.catalog-hero * {
    text-shadow: 0 2px 14px rgba(8, 24, 18, 0.2);
}

.catalog-filter-card {
    margin-top: 1.4rem;
    padding: 0.95rem;
    border-radius: 1.35rem;
    border: 1px solid rgba(24, 77, 59, 0.08);
    background:
        radial-gradient(circle at top right, rgba(216, 177, 92, 0.12), transparent 26%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(244, 248, 245, 0.95));
    box-shadow: 0 14px 30px rgba(24, 77, 59, 0.07);
}

.catalog-filter-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.8rem;
}

.catalog-filter-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.32rem 0.68rem;
    border-radius: 999px;
    background: rgba(24, 77, 59, 0.08);
    color: #0f7a72;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.catalog-filter-title {
    margin: 0.48rem 0 0;
    color: #163d2f;
    font-size: clamp(1.2rem, 2vw, 1.55rem);
    font-weight: 800;
    line-height: 1.2;
}

.catalog-filter-subtitle {
    margin: 0.3rem 0 0;
    color: #667871;
    max-width: 40rem;
    font-size: 0.87rem;
    line-height: 1.4;
}

.catalog-filter-grid {
    display: grid;
    gap: 0.72rem;
}

.catalog-filter-primary {
    display: grid;
    gap: 0.4rem;
}

.catalog-filter-section-label {
    display: flex;
    align-items: center;
    margin-bottom: 0.4rem;
}

.catalog-filter-section-label span {
    display: inline-flex;
    align-items: center;
    padding: 0.1rem 0;
    color: #5f746b;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.catalog-filter-field {
    height: 100%;
}

.catalog-filter-input-shell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 50px;
    padding: 0.68rem 0.9rem;
    border-radius: 1rem;
    border: 1px solid rgba(24, 77, 59, 0.1);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.catalog-filter-input-icon {
    flex: 0 0 auto;
    color: #0f7a72;
    font-size: 1rem;
    transition: color 0.2s;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.spin-icon {
    display: inline-block;
    animation: spin 0.7s linear infinite;
}

.catalog-filter-input-shell .form-control {
    min-height: auto;
    padding: 0.2rem 0;
    border: 0;
    background: transparent;
    font-size: 0.92rem;
}

.catalog-filter-input-shell .form-control:focus {
    border: 0;
    background: transparent;
    box-shadow: none;
}

.catalog-filter-refine {
    padding-top: 0.15rem;
    border-top: 1px solid rgba(24, 77, 59, 0.08);
}

.catalog-filter-secondary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.65rem;
    align-items: start;
}

.catalog-filter-secondary .catalog-filter-actions {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: flex-end;
}

.catalog-filter-box {
    padding: 0.58rem;
    border-radius: 0.9rem;
    border: 1px solid rgba(24, 77, 59, 0.08);
    background: rgba(247, 250, 248, 0.78);
}

.catalog-filter-card label {
    display: block;
    margin-bottom: 0.3rem;
    color: #537093;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.catalog-filter-card .form-control,
.catalog-filter-card .select2-container--default .select2-selection--single {
    min-height: 44px;
    border-radius: 0.82rem;
    border: 1px solid rgba(28, 82, 63, 0.12);
    box-shadow: none;
}

.catalog-filter-card .form-control {
    padding: 0.62rem 0.78rem;
}

.catalog-filter-card .select2-container--default .select2-selection--single {
    display: flex;
    align-items: center;
    padding: 0.18rem 0.62rem;
}

.catalog-filter-card .select2-container .select2-selection--single .select2-selection__rendered {
    line-height: 1.5rem;
}

.catalog-filter-card .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 42px;
}

.select2-dropdown {
    border: 1px solid rgba(24, 77, 59, 0.12);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 18px 34px rgba(24, 77, 59, 0.12);
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    border: 1px solid rgba(24, 77, 59, 0.12);
    border-radius: 0.85rem;
    padding: 0.65rem 0.8rem;
    box-shadow: none;
}

.select2-container--default .select2-results__option {
    padding: 0.7rem 0.85rem;
}

.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    background: linear-gradient(135deg, #167a78, #0f5d73);
    color: #ffffff;
}

.select2-container--default .select2-results__option--selected {
    background: rgba(24, 77, 59, 0.08);
    color: #14392c;
}

.select2-container--default .select2-results__option--disabled {
    color: #6e8279;
}

.select2-container--default.select2-container--open .select2-selection--single,
.select2-container--default.select2-container--focus .select2-selection--single {
    border-color: rgba(43, 122, 93, 0.35);
    box-shadow: 0 0 0 0.18rem rgba(43, 122, 93, 0.1);
}

.select2-container--default .select2-selection--single .select2-selection__placeholder,
.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #294759;
}

.catalog-filter-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 100%;
}

.catalog-filter-card .btn {
    min-height: 44px;
    border: 0;
    border-radius: 0.85rem;
    padding-inline: 0.9rem;
    font-size: 0.82rem;
    font-weight: 800;
    white-space: nowrap;
}

.catalog-filter-card .btn-search {
    color: #fff;
    background: linear-gradient(135deg, #1f7a5c, #145340);
    box-shadow: 0 8px 16px rgba(20, 83, 64, 0.14);
}

.catalog-filter-card .btn-clear {
    gap: 0.35rem;
    color: #5d7486;
    background: transparent;
    border: 1px solid rgba(20, 53, 73, 0.08);
    box-shadow: none;
}

.catalog-results-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.6rem;
    margin-bottom: 1rem;
}

.catalog-results-bar h2 {
    margin: 0;
    color: #163d2f;
    font-size: 1.35rem;
    font-weight: 800;
}

.catalog-results-bar p {
    margin: 0.28rem 0 0;
    color: #6a7a74;
}

.catalog-results-bar__actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.catalog-perpage {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.38rem 0.65rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(24, 77, 59, 0.1);
    background: rgba(255, 255, 255, 0.88);
}

.catalog-perpage__label,
.catalog-perpage__suffix {
    color: #5f746b;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}

.catalog-perpage__select {
    appearance: none;
    -webkit-appearance: none;
    padding: 0.18rem 1.4rem 0.18rem 0.5rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(24, 77, 59, 0.14);
    background: rgba(247, 250, 248, 0.9)
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%235f746b'/%3E%3C/svg%3E")
        no-repeat right 0.45rem center;
    color: #163d2f;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    min-width: 48px;
    transition: border-color 0.14s, box-shadow 0.14s;
}

.catalog-perpage__select:focus {
    outline: none;
    border-color: rgba(31, 122, 92, 0.4);
    box-shadow: 0 0 0 0.18rem rgba(31, 122, 92, 0.1);
}

body.library-dark .catalog-perpage {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
}

body.library-dark .catalog-perpage__label,
body.library-dark .catalog-perpage__suffix {
    color: #aebdca;
}

body.library-dark .catalog-perpage__select {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: #edf3f8;
}

.catalog-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 0.8rem;
    border-radius: 999px;
    background: rgba(24, 77, 59, 0.08);
    color: #235842;
    font-weight: 700;
    white-space: nowrap;
}

.catalog-empty {
    padding: 2rem;
    border-radius: 1.4rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.82);
    color: #6b7a74;
    box-shadow: 0 12px 30px rgba(24, 77, 59, 0.08);
}

/* ── Pagination ── */

.catalog-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
    padding: 0.85rem 1.1rem;
    border-radius: 1.1rem;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(24, 77, 59, 0.08);
    box-shadow: 0 4px 18px rgba(24, 77, 59, 0.06);
}

.catalog-pagination__info {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: #4e6b5e;
}

.catalog-pagination__info i {
    color: #7da898;
    font-size: 0.9rem;
}

.catalog-pagination__info strong {
    color: #163d2f;
    font-weight: 700;
}

.catalog-pagination__nav {
    display: flex;
    align-items: center;
    gap: 0.22rem;
    flex-wrap: wrap;
}

.catalog-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 0.55rem;
    border-radius: 0.65rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #2d5e4a;
    background: transparent;
    border: 1px solid transparent;
    text-decoration: none;
    transition: background 0.17s ease, color 0.17s ease, border-color 0.17s ease, box-shadow 0.17s ease;
    cursor: pointer;
    user-select: none;
}

.catalog-page-btn:hover {
    background: rgba(24, 77, 59, 0.08);
    color: #163d2f;
    border-color: rgba(24, 77, 59, 0.14);
}

.catalog-page-btn--active {
    background: linear-gradient(135deg, #1f7a5c 0%, #145340 100%);
    color: #fff !important;
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(20, 83, 64, 0.28);
    cursor: default;
}

.catalog-page-btn--arrow {
    border-color: rgba(24, 77, 59, 0.14);
    background: rgba(255, 255, 255, 0.7);
}

.catalog-page-btn--arrow:hover {
    background: rgba(24, 77, 59, 0.1);
}

.catalog-page-btn--dots {
    cursor: default;
    color: #94a3b8;
    border-color: transparent;
    letter-spacing: 0.05em;
}

.catalog-page-btn.disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

body.library-dark .catalog-hero {
    box-shadow: 0 24px 54px rgba(0, 0, 0, 0.32);
}

body.library-dark .catalog-filter-card,
body.library-dark .catalog-empty {
    background: linear-gradient(180deg, rgba(18, 26, 35, 0.96), rgba(12, 18, 26, 0.93));
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.24);
}

body.library-dark .catalog-filter-refine {
    border-top-color: rgba(255, 255, 255, 0.08);
}

body.library-dark .catalog-filter-kicker {
    background: rgba(78, 181, 145, 0.12);
    color: #86e2c0;
}

body.library-dark .catalog-filter-title,
body.library-dark .catalog-filter-card label,
body.library-dark .catalog-results-bar h2 {
    color: #f2f6fb;
}

body.library-dark .catalog-filter-subtitle,
body.library-dark .catalog-results-bar p,
body.library-dark .catalog-empty {
    color: #aebdca;
}

body.library-dark .catalog-filter-section-label span {
    color: #aebdca;
}

body.library-dark .catalog-filter-box {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
}

body.library-dark .catalog-filter-input-shell {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}

body.library-dark .catalog-filter-input-icon {
    color: #86e2c0;
}

body.library-dark .catalog-filter-card .form-control,
body.library-dark .catalog-filter-card .select2-container--default .select2-selection--single {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: #edf3f8;
}

body.library-dark .catalog-filter-card .form-control::placeholder {
    color: #8ea3b3;
}

body.library-dark .catalog-filter-card .form-control:focus,
body.library-dark .catalog-filter-card .select2-container--default.select2-container--focus .select2-selection--single,
body.library-dark .catalog-filter-card .select2-container--default .select2-selection--single:focus {
    border-color: rgba(216, 177, 92, 0.45);
    box-shadow: 0 0 0 0.2rem rgba(216, 177, 92, 0.14);
}

body.library-dark .catalog-filter-card .select2-container--default .select2-selection--single .select2-selection__rendered,
body.library-dark .catalog-filter-card .select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #edf3f8;
}

body.library-dark .catalog-filter-card .select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-top-color: #aebdca;
}

body.library-dark .select2-dropdown {
    background: #16212b;
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 22px 38px rgba(0, 0, 0, 0.34);
}

body.library-dark .select2-container--default .select2-search--dropdown {
    background: #16212b;
}

body.library-dark .select2-container--default .select2-search--dropdown .select2-search__field {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: #edf3f8;
}

body.library-dark .select2-container--default .select2-search--dropdown .select2-search__field::placeholder {
    color: #8ea3b3;
}

body.library-dark .select2-container--default .select2-results {
    background: #16212b;
}

body.library-dark .select2-container--default.select2-container--open .select2-selection--single,
body.library-dark .select2-container--default.select2-container--focus .select2-selection--single,
body.library-dark .select2-container--default.select2-container--disabled .select2-selection--single {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: #edf3f8;
    box-shadow: 0 0 0 0.18rem rgba(216, 177, 92, 0.08);
}

body.library-dark .select2-container--default .select2-selection--single .select2-selection__placeholder,
body.library-dark .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #edf3f8;
}

body.library-dark .select2-container--default .select2-results__option {
    color: #dbe6ee;
}

body.library-dark .select2-container--default .select2-results__option--selected {
    background: rgba(255, 255, 255, 0.06);
    color: #f1c979;
}

body.library-dark .select2-container--default .select2-results__option--disabled {
    color: #8ea3b3;
    background: transparent;
}

body.library-dark .catalog-chip {
    background: rgba(78, 181, 145, 0.12);
    color: #86e2c0;
}

body.library-dark .catalog-filter-card .btn-clear {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.1);
    color: #d8e3ea;
}

body.library-dark .catalog-pagination {
    background: rgba(18, 28, 22, 0.92);
    border-color: rgba(255, 255, 255, 0.07);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.22);
}

body.library-dark .catalog-pagination__info {
    color: #7aab96;
}

body.library-dark .catalog-pagination__info strong {
    color: #c8e8dc;
}

body.library-dark .catalog-page-btn {
    color: #8abfaa;
}

body.library-dark .catalog-page-btn:hover {
    background: rgba(78, 181, 145, 0.1);
    color: #c8e8dc;
    border-color: rgba(78, 181, 145, 0.18);
}

body.library-dark .catalog-page-btn--active {
    background: linear-gradient(135deg, #1d7c5b, #116249);
    color: #fff !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

body.library-dark .catalog-page-btn--arrow {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
    color: #8abfaa;
}

/* ── Tabs ── */

.catalog-tab-nav {
    display: flex;
    gap: 0.35rem;
    margin: 0.7rem 0 0.75rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid rgba(24, 77, 59, 0.09);
}

.catalog-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    padding: 0.38rem 0.82rem;
    border-radius: 0.65rem;
    border: 1px solid transparent;
    background: transparent;
    color: #5f746b;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.14s, color 0.14s, box-shadow 0.14s, border-color 0.14s;
}

.catalog-tab-btn:hover {
    background: rgba(24, 77, 59, 0.07);
    color: #163d2f;
    border-color: rgba(24, 77, 59, 0.1);
}

.catalog-tab-btn.active {
    background: linear-gradient(135deg, #1f7a5c, #145340);
    color: #fff;
    box-shadow: 0 4px 12px rgba(20, 83, 64, 0.18);
}

.catalog-tab-panel {
    display: none;
}

.catalog-tab-panel.active {
    display: block;
}

/* ── Autor explorer (Tab 2) ── */

.catalog-autor-explorer {
    padding-top: 0.2rem;
}

.autor-explorer-hint {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    padding: 0.52rem 0.72rem;
    border-radius: 0.75rem;
    background: rgba(24, 77, 59, 0.05);
    color: #4e6b5e;
    font-size: 0.82rem;
    line-height: 1.4;
    margin-bottom: 0.75rem;
}

.autor-explorer-hint i {
    color: #0f7a72;
    flex-shrink: 0;
    font-size: 0.9rem;
    margin-top: 0.1rem;
}

.catalog-autor-explorer .autor-alpha-picker {
    border-top: none;
    padding-top: 0;
    margin-top: 0;
    margin-bottom: 0.55rem;
}

.catalog-autor-explorer .autor-alpha-btn {
    min-width: 30px;
    height: 30px;
    font-size: 0.76rem;
    border-radius: 0.5rem;
}

.catalog-autor-explorer .autor-alpha-results {
    max-height: 160px;
}

.autor-active-badge {
    display: none;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.65rem;
    padding: 0.46rem 0.72rem;
    border-radius: 0.75rem;
    background: rgba(24, 77, 59, 0.07);
    border: 1px solid rgba(24, 77, 59, 0.1);
    color: #1a4a35;
    font-size: 0.82rem;
}

.autor-active-badge.visible {
    display: flex;
}

.autor-active-badge > i:first-child {
    color: #1f7a5c;
    flex-shrink: 0;
}

.autor-active-badge strong {
    color: #163d2f;
}

#autorActiveClear {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    background: none;
    border: none;
    color: #c0392b;
    cursor: pointer;
    font-size: 1rem;
    padding: 0;
    transition: color 0.14s;
}

#autorActiveClear:hover {
    color: #922b21;
}

/* ── Author letter picker ── */

.autor-alpha-picker {
    margin-top: 0.6rem;
    padding-top: 0.55rem;
    border-top: 1px solid rgba(24, 77, 59, 0.1);
}

.autor-alpha-label {
    display: block;
    margin-bottom: 0.38rem;
    color: #537093;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.autor-alpha-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 0.2rem;
}

.autor-alpha-btn {
    min-width: 22px;
    height: 22px;
    padding: 0 0.28rem;
    border-radius: 0.4rem;
    border: 1px solid rgba(24, 77, 59, 0.14);
    background: rgba(255, 255, 255, 0.72);
    color: #2d5e4a;
    font-size: 0.7rem;
    font-weight: 700;
    cursor: pointer;
    line-height: 1;
    transition: background 0.14s, color 0.14s, border-color 0.14s, box-shadow 0.14s;
}

.autor-alpha-btn:hover {
    background: rgba(24, 77, 59, 0.1);
    border-color: rgba(24, 77, 59, 0.24);
}

.autor-alpha-btn.active {
    background: linear-gradient(135deg, #1f7a5c, #145340);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 3px 8px rgba(20, 83, 64, 0.24);
}

.autor-alpha-results {
    display: none;
    flex-wrap: wrap;
    gap: 0.26rem;
    margin-top: 0.5rem;
    max-height: 130px;
    overflow-y: auto;
    padding: 0.4rem;
    border-radius: 0.75rem;
    background: rgba(247, 250, 248, 0.9);
    border: 1px solid rgba(24, 77, 59, 0.08);
}

.autor-alpha-results.visible {
    display: flex;
}

.autor-alpha-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.52rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(24, 77, 59, 0.13);
    color: #2d5e4a;
    font-size: 0.74rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.14s, color 0.14s, border-color 0.14s;
}

.autor-alpha-chip:hover {
    background: rgba(24, 77, 59, 0.1);
    border-color: rgba(24, 77, 59, 0.26);
}

.autor-alpha-chip.selected {
    background: linear-gradient(135deg, #1f7a5c, #145340);
    color: #fff;
    border-color: transparent;
}

.autor-alpha-empty {
    color: #8a9e97;
    font-size: 0.78rem;
    font-style: italic;
    padding: 0.15rem 0.25rem;
}

body.library-dark .catalog-tab-nav {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

body.library-dark .catalog-tab-btn {
    color: #aebdca;
}

body.library-dark .catalog-tab-btn:hover {
    background: rgba(78, 181, 145, 0.08);
    color: #c8e8dc;
    border-color: rgba(78, 181, 145, 0.14);
}

body.library-dark .catalog-tab-btn.active {
    background: linear-gradient(135deg, #1d7c5b, #116249);
    color: #fff;
}

body.library-dark .autor-explorer-hint {
    background: rgba(78, 181, 145, 0.06);
    color: #8abfaa;
}

body.library-dark .autor-explorer-hint i {
    color: #86e2c0;
}

body.library-dark .autor-active-badge {
    background: rgba(78, 181, 145, 0.07);
    border-color: rgba(78, 181, 145, 0.14);
    color: #c8e8dc;
}

body.library-dark .autor-active-badge > i:first-child {
    color: #86e2c0;
}

body.library-dark .autor-active-badge strong {
    color: #e8f5ef;
}

body.library-dark #autorActiveClear {
    color: #f08080;
}

body.library-dark #autorActiveClear:hover {
    color: #ff6060;
}

body.library-dark .autor-alpha-picker {
    border-top-color: rgba(255, 255, 255, 0.08);
}

body.library-dark .autor-alpha-label {
    color: #aebdca;
}

body.library-dark .autor-alpha-btn {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
    color: #8abfaa;
}

body.library-dark .autor-alpha-btn:hover {
    background: rgba(78, 181, 145, 0.1);
    border-color: rgba(78, 181, 145, 0.22);
    color: #c8e8dc;
}

body.library-dark .autor-alpha-btn.active {
    background: linear-gradient(135deg, #1d7c5b, #116249);
    color: #fff;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.28);
}

body.library-dark .autor-alpha-results {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
}

body.library-dark .autor-alpha-chip {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: #dbe6ee;
}

body.library-dark .autor-alpha-chip:hover {
    background: rgba(78, 181, 145, 0.1);
    border-color: rgba(78, 181, 145, 0.22);
    color: #c8e8dc;
}

body.library-dark .autor-alpha-chip.selected {
    background: linear-gradient(135deg, #1d7c5b, #116249);
    color: #fff;
    border-color: transparent;
}

body.library-dark .autor-alpha-empty {
    color: #5d7080;
}

/* ── Responsive ── */

@media (max-width: 767.98px) {
    .catalog-hero,
    .catalog-filter-card {
        padding: 1rem;
    }

    .catalog-pagination {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .catalog-results-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .catalog-filter-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .catalog-filter-secondary {
        grid-template-columns: 1fr 1fr;
    }

    .catalog-filter-actions {
        width: 100%;
        align-items: stretch;
    }

    .catalog-filter-secondary .catalog-filter-actions {
        grid-column: 1 / -1;
        flex-direction: row;
    }
}

@media (max-width: 575.98px) {
    .catalog-filter-card {
        padding: 0.85rem;
    }

    .catalog-filter-actions {
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
    }

    .catalog-filter-secondary {
        grid-template-columns: 1fr;
    }

    .catalog-filter-card .btn,
    .catalog-filter-card .btn-clear {
        width: 100%;
    }
}
