@charset "UTF-8";

/* ==========================================================
   WEB-ИРБИС64+ — ФИРМЕННОЕ ОФОРМЛЕНИЕ
   МБУК ЦБС Рыбинского округа · электронный каталог
   Палитра: Navy + Ivory + Gold
   Ширина: 1140px. Футер по центру.
   Баннер: SVG-сцена (книга, лампа, стопка, чашка)
   ========================================================== */

@import url(https://fonts.googleapis.com/css?family=Roboto+Condensed:400,300italic,300,400italic,700,700italic&subset=latin,cyrillic);
@import url(https://fonts.googleapis.com/css?family=Roboto:400,100,300,300italic,400italic,500,500italic,700,700italic,900&subset=latin,cyrillic);
@import url(https://fonts.googleapis.com/css?family=Lora:400,400italic,700,700italic&subset=latin,cyrillic);

/* ---------- ПЕРЕМЕННЫЕ ---------- */
:root {
    --navy: #1A2A3A;
    --navy-dark: #0F1A24;
    --navy-light: #2A3D52;
    --ivory: #FCFBF4;
    --ivory-dark: #F2EFE5;
    --gold: #D4AF37;
    --gold-dark: #B8960C;
    --gold-light: #E8C96A;
    --text-dark: #2C2C2C;
    --text-muted: #5B6770;
    --border-light: #E8E4D9;
    --border-dark: #3D4F5E;
    --bg-gray: #EBE8DE;
    --white: #FFFFFF;
    --shadow: 0 6px 20px rgba(26, 42, 58, 0.10);
    --shadow-lg: 0 12px 30px rgba(26, 42, 58, 0.15);
    --transition: all 0.3s ease;
    --container: 1140px;
}

/* ==========================================================
   БАЗА
   ========================================================== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: auto !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    min-height: 100vh;
}

body {
    background: var(--ivory);
    color: var(--text-muted);
    font-family: "Roboto Condensed", "Segoe UI", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.7;
    padding: 0;
}

img {
    max-width: 100% !important;
    height: auto !important;
}

iframe {
    max-width: 100% !important;
}

h1, h2, h3, h4, h5, h6 {
    font-family: "Roboto Condensed", "Segoe UI", sans-serif;
    color: var(--navy);
    font-weight: 700;
    line-height: 1.3;
}

a {
    color: var(--gold);
    text-decoration: none;
    transition: var(--transition);
}

a:hover,
a:focus {
    color: var(--gold-dark);
}

A#spec1:hover { text-decoration: underline; }
A#spec1 { color: var(--gold); text-decoration: none; }

/* ==========================================================
   КОНТЕЙНЕР — 1140px
   ========================================================== */
.irbis-container,
.wrapper {
    width: 100% !important;
    max-width: var(--container) !important;
    margin: 0 auto !important;
    padding: 16px 16px 0 16px !important;
    box-sizing: border-box;
}

@media (max-width: 1160px) {
    .irbis-container,
    .wrapper {
        max-width: 100% !important;
    }
}

@media (max-width: 768px) {
    .irbis-container,
    .wrapper {
        padding: 12px 12px 0 12px !important;
    }
}

/* ==========================================================
   ШАПКА — три зоны (логотип / меню / пользователь)
   ========================================================== */
.topcell {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto 20px auto !important;
    background: var(--navy) !important;
    border: 1px solid var(--gold) !important;
    border-bottom: 3px solid var(--gold) !important;
    border-radius: 6px !important;
    padding: 0 !important;
    box-shadow: 0 8px 22px rgba(26, 42, 58, 0.25);
    box-sizing: border-box;
    overflow: hidden;
}

.topcell > table {
    width: 100% !important;
    border: none !important;
    border-collapse: collapse !important;
    margin: 0 !important;
    padding: 0 !important;
}

.topcell td {
    border: none !important;
    background: transparent !important;
    vertical-align: middle !important;
    padding: 14px 18px !important;
}

.topcell-logo {
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.15;
}

.topcell-logo .logo-title {
    font-family: "Roboto Condensed", sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    white-space: nowrap;
}

.topcell-logo .logo-subtitle {
    font-family: "Roboto Condensed", sans-serif;
    font-size: 11px;
    font-weight: 400;
    color: var(--gold-light);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    white-space: nowrap;
}

.topcelltext {
    color: var(--white) !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    line-height: 1.4;
}

.topcell-menu {
    display: flex;
    gap: 4px;
    justify-content: left;
    flex-wrap: wrap;
    align-items: center;
}

.topcell-menu a {
    color: var(--white) !important;
    padding: 8px 14px;
    border-radius: 4px;
    border: 1px solid transparent;
    font-family: "Roboto Condensed", sans-serif;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none !important;
    white-space: nowrap;
    transition: var(--transition);
}

.topcell-menu a:hover {
    background: rgba(212, 175, 55, 0.15);
    color: var(--gold) !important;
    border-color: var(--gold);
}

.topcell-user {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: nowrap;
}

.topcell-user a {
    color: var(--white) !important;
    padding: 8px 14px;
    border-radius: 4px;
    border: 1px solid transparent;
    font-family: "Roboto Condensed", sans-serif;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none !important;
    white-space: nowrap;
    transition: var(--transition);
}

.topcell-user a:hover {
    background: rgba(212, 175, 55, 0.15);
    color: var(--gold) !important;
    border-color: var(--gold);
}

@media (max-width: 900px) {
    .topcell td {
        display: block !important;
        width: 100% !important;
        text-align: center !important;
        padding: 8px 12px !important;
    }
    .topcell-logo { align-items: center; }
    .topcell-menu { justify-content: center; }
    .topcell-user { justify-content: center; flex-wrap: wrap; }
}

/* ==========================================================
   БАННЕР — Вариант B (книга / лампа / стопка / чашка)
   ========================================================== */
.banner-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto 14px auto !important;
    padding: 0 !important;
    box-sizing: border-box;
    display: block !important;
}

.library-banner {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 220px !important;
    margin: 0 !important;
    padding: 32px 24px 70px 24px !important;
    background-color: #1A2A3A;
    border: 1px solid var(--gold);
    border-radius: 6px;
    text-align: center;
    color: var(--white);
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(26, 42, 58, 0.35);
    box-sizing: border-box;
    display: block !important;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 240' preserveAspectRatio='none'%3E%3Crect x='0' y='140' width='1200' height='100' fill='%230F1A24'/%3E%3Crect x='0' y='150' width='1200' height='10' fill='%23000000' opacity='0.4'/%3E%3Cg%3E%3Crect x='18' y='158' width='11' height='42' fill='%23D4AF37'/%3E%3Crect x='32' y='152' width='9' height='48' fill='%234A6FA0'/%3E%3Crect x='44' y='162' width='13' height='38' fill='%232E7D6B'/%3E%3Crect x='60' y='148' width='10' height='52' fill='%23A14A4A'/%3E%3Crect x='73' y='156' width='12' height='44' fill='%23E8C96A'/%3E%3Crect x='88' y='160' width='9' height='40' fill='%23C0392B'/%3E%3Crect x='100' y='150' width='11' height='50' fill='%236B7B94'/%3E%3Crect x='130' y='154' width='10' height='46' fill='%232E7D6B'/%3E%3Crect x='143' y='158' width='12' height='42' fill='%23D4AF37'/%3E%3Crect x='158' y='146' width='9' height='54' fill='%23A14A4A'/%3E%3Crect x='170' y='160' width='13' height='40' fill='%234A6FA0'/%3E%3Crect x='186' y='152' width='11' height='48' fill='%23C0392B'/%3E%3Crect x='200' y='158' width='10' height='42' fill='%23E8C96A'/%3E%3Crect x='213' y='148' width='12' height='52' fill='%236B7B94'/%3E%3Crect x='240' y='154' width='10' height='46' fill='%234A6FA0'/%3E%3Crect x='253' y='158' width='11' height='42' fill='%23D4AF37'/%3E%3Crect x='272' y='150' width='9' height='50' fill='%23C0392B'/%3E%3Crect x='284' y='156' width='12' height='44' fill='%232E7D6B'/%3E%3Crect x='299' y='146' width='10' height='54' fill='%23A14A4A'/%3E%3Crect x='312' y='160' width='11' height='40' fill='%236B7B94'/%3E%3Crect x='326' y='152' width='13' height='48' fill='%23E8C96A'/%3E%3Crect x='360' y='158' width='10' height='42' fill='%23D4AF37'/%3E%3Crect x='373' y='148' width='12' height='52' fill='%234A6FA0'/%3E%3Crect x='388' y='154' width='11' height='46' fill='%23C0392B'/%3E%3Crect x='402' y='146' width='9' height='54' fill='%232E7D6B'/%3E%3Crect x='414' y='160' width='13' height='40' fill='%23A14A4A'/%3E%3Crect x='430' y='150' width='10' height='50' fill='%23E8C96A'/%3E%3Crect x='443' y='156' width='11' height='44' fill='%236B7B94'/%3E%3Crect x='457' y='152' width='9' height='48' fill='%23D4AF37'/%3E%3Crect x='490' y='154' width='12' height='46' fill='%234A6FA0'/%3E%3Crect x='505' y='158' width='10' height='42' fill='%232E7D6B'/%3E%3Crect x='518' y='150' width='11' height='50' fill='%23A14A4A'/%3E%3Crect x='532' y='156' width='9' height='44' fill='%23D4AF37'/%3E%3Crect x='548' y='148' width='13' height='52' fill='%23C0392B'/%3E%3Crect x='564' y='158' width='11' height='42' fill='%236B7B94'/%3E%3Crect x='578' y='150' width='10' height='50' fill='%23E8C96A'/%3E%3Crect x='610' y='156' width='11' height='44' fill='%23D4AF37'/%3E%3Crect x='624' y='150' width='10' height='50' fill='%234A6FA0'/%3E%3Crect x='637' y='158' width='13' height='42' fill='%232E7D6B'/%3E%3Crect x='653' y='146' width='9' height='54' fill='%23A14A4A'/%3E%3Crect x='665' y='152' width='11' height='48' fill='%23C0392B'/%3E%3Crect x='679' y='158' width='10' height='42' fill='%23E8C96A'/%3E%3Crect x='692' y='148' width='12' height='52' fill='%236B7B94'/%3E%3Crect x='725' y='158' width='10' height='42' fill='%232E7D6B'/%3E%3Crect x='738' y='150' width='12' height='50' fill='%23D4AF37'/%3E%3Crect x='753' y='156' width='11' height='44' fill='%234A6FA0'/%3E%3Crect x='767' y='146' width='10' height='54' fill='%23C0392B'/%3E%3Crect x='780' y='158' width='9' height='42' fill='%23A14A4A'/%3E%3Crect x='792' y='152' width='13' height='48' fill='%23E8C96A'/%3E%3Crect x='808' y='146' width='10' height='54' fill='%236B7B94'/%3E%3Crect x='840' y='154' width='11' height='46' fill='%23D4AF37'/%3E%3Crect x='854' y='148' width='10' height='52' fill='%234A6FA0'/%3E%3Crect x='867' y='158' width='13' height='42' fill='%232E7D6B'/%3E%3Crect x='883' y='152' width='9' height='48' fill='%23A14A4A'/%3E%3Crect x='895' y='158' width='11' height='42' fill='%23C0392B'/%3E%3Crect x='909' y='146' width='10' height='54' fill='%23E8C96A'/%3E%3Crect x='922' y='158' width='12' height='42' fill='%236B7B94'/%3E%3Crect x='960' y='156' width='10' height='44' fill='%232E7D6B'/%3E%3Crect x='973' y='150' width='12' height='50' fill='%23D4AF37'/%3E%3Crect x='988' y='158' width='11' height='42' fill='%234A6FA0'/%3E%3Crect x='1002' y='146' width='10' height='54' fill='%23A14A4A'/%3E%3Crect x='1015' y='152' width='13' height='48' fill='%23C0392B'/%3E%3Crect x='1031' y='158' width='10' height='42' fill='%23E8C96A'/%3E%3Crect x='1044' y='148' width='11' height='52' fill='%236B7B94'/%3E%3Crect x='1080' y='158' width='10' height='42' fill='%23D4AF37'/%3E%3Crect x='1093' y='150' width='11' height='50' fill='%234A6FA0'/%3E%3Crect x='1107' y='158' width='13' height='42' fill='%232E7D6B'/%3E%3Crect x='1123' y='146' width='10' height='54' fill='%23A14A4A'/%3E%3Crect x='1136' y='152' width='11' height='48' fill='%23C0392B'/%3E%3Crect x='1150' y='158' width='10' height='42' fill='%23E8C96A'/%3E%3Crect x='1163' y='148' width='12' height='52' fill='%236B7B94'/%3E%3C/g%3E%3Crect x='0' y='200' width='1200' height='14' fill='%233D4F5E'/%3E%3Crect x='0' y='200' width='1200' height='2' fill='%23D4AF37' opacity='0.7'/%3E%3Crect x='0' y='214' width='1200' height='26' fill='%23000000' opacity='0.35'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center bottom;
    background-size: 100% 100%;
}
@media (max-width: 768px) {
    .library-banner {
        min-height: 180px !important;
        padding: 24px 16px 60px 16px !important;
        background-size: 100% 100% !important;
    }
    .banner-title { font-size: 20px; }
    .banner-subtitle { font-size: 13px; }
}
.library-banner::before,
.library-banner::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    z-index: 1;
}
.library-banner::before { top: 0; }
.library-banner::after { bottom: 0; }

.banner-title {
    font-family: "Roboto Condensed", sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--white);
    margin: 0 0 6px 0;
    line-height: 1.25;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    position: relative;
    z-index: 2;
}

.banner-subtitle {
    font-family: "Roboto Condensed", sans-serif;
    font-size: 15px;
    font-weight: 400;
    color: var(--gold-light);
    margin: 0;
    line-height: 1.4;
    letter-spacing: 0.8px;
    position: relative;
    z-index: 2;
}

img[src*="irbis.gif"],
img[src*="eb.gif"],
.book-logo,
.author-cell {
    display: none !important;
}

@media (max-width: 768px) {
    .library-banner {
        padding: 28px 16px !important;
        background-size: cover, auto 100% !important;
    }
    .banner-title { font-size: 20px; }
    .banner-subtitle { font-size: 13px; }
}

/* ==========================================================
   ПОИСКОВЫЙ БЛОК — белая карточка
   ========================================================== */
.SearchCell {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto 20px auto !important;
    background: var(--white) !important;
    border: 1px solid var(--border-light) !important;
    border-radius: 8px !important;
    padding: 20px 24px !important;
    box-shadow: 0 8px 30px rgba(26, 42, 58, 0.10);
    overflow: visible !important;
    box-sizing: border-box;
    position: relative;
}

.SearchCell > table[background],
.SearchCell table[background] {
    background-image: none !important;
    background-color: transparent !important;
}

/* ==========================================================
   ВЫБОР БД (SearchDBList) — единый рабочий блок
   ========================================================== */
.SearchDBList:empty,
.SearchDBList[style*="display: none"],
.SearchDBList[style*="display:none"] {
    display: none !important;
}

.SearchDBList:has(select#I21DBN) {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 0 !important;
    height: auto !important;
    margin: 0 0 14px 0 !important;
    padding: 0 !important;
    background: var(--ivory) !important;
    border: 1px solid var(--border-light) !important;
    border-left: 3px solid var(--gold) !important;
    border-radius: 6px !important;
    box-sizing: border-box !important;
    overflow: visible !important;
    box-shadow: 0 2px 8px rgba(26, 42, 58, 0.04);
    font-family: "Roboto Condensed", sans-serif;
    transition: var(--transition);
}

.SearchDBList:has(select#I21DBN):hover {
    border-color: var(--gold) !important;
    border-left-color: var(--gold-dark) !important;
    background: var(--ivory-dark) !important;
}

.SearchDBList:has(select#I21DBN) > table,
.SearchDBList:has(select#I21DBN) table,
.SearchDBList:has(select#I21DBN) tbody,
.SearchDBList:has(select#I21DBN) tr {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 0 !important;
    height: auto !important;
    border: none !important;
    border-collapse: collapse !important;
    background: transparent !important;
    margin: 0 !important;
    padding: 0 !important;
    table-layout: fixed !important;
    overflow: visible !important;
}

.SearchDBList:has(select#I21DBN) td {
    border: none !important;
    background: transparent !important;
    padding: 12px 0 !important;
    margin: 0 !important;
    vertical-align: middle !important;
    box-sizing: border-box !important;
    height: auto !important;
    min-height: 0 !important;
    line-height: 1.4 !important;
    overflow: visible !important;
}

.SearchDBList:has(select#I21DBN) td:first-child {
    width: 140px !important;
    min-width: 140px !important;
    max-width: 140px !important;
    padding-left: 16px !important;
    padding-right: 12px !important;
    white-space: nowrap !important;
    overflow: visible !important;
}

.SearchDBList:has(select#I21DBN) td:first-child span {
    display: inline-block !important;
    font-family: "Roboto Condensed", sans-serif !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    color: var(--navy) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.6px !important;
    line-height: 1.4 !important;
    padding: 0 !important;
    margin: 0 !important;
    white-space: nowrap !important;
    vertical-align: middle !important;
    overflow: visible !important;
}

.SearchDBList:has(select#I21DBN) td:last-child {
    width: auto !important;
    max-width: 100% !important;
    padding-right: 16px !important;
    padding-left: 0 !important;
    overflow: visible !important;
}

.SearchDBList select#I21DBN {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 42px !important;
    max-height: none !important;
    box-sizing: border-box !important;
    background: var(--white) !important;
    border: 1px solid var(--border-light) !important;
    border-radius: 4px !important;
    padding: 10px 36px 10px 14px !important;
    font-size: 14px !important;
    font-family: "Roboto Condensed", sans-serif !important;
    color: var(--navy) !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    box-shadow: none !important;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--navy) 50%),
        linear-gradient(135deg, var(--navy) 50%, transparent 50%);
    background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    vertical-align: middle !important;
    overflow: visible !important;
}

.SearchDBList select#I21DBN:focus {
    outline: none !important;
    border-color: var(--gold) !important;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.18) !important;
}

.SearchDBList select#I21DBN option {
    color: var(--text-dark);
    background: var(--white);
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 500;
}

@media (max-width: 640px) {
    .SearchDBList:has(select#I21DBN) td:first-child,
    .SearchDBList:has(select#I21DBN) td:last-child {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 16px !important;
        padding-right: 16px !important;
    }
    .SearchDBList:has(select#I21DBN) td:first-child {
        padding-bottom: 4px !important;
    }
}

/* ==========================================================
   СТРОКА ПОИСКА («Я ищу» + поле + кнопка)
   ========================================================== */
.SearchCell table.search-main {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    border: none !important;
    background: transparent !important;
}

.SearchCell table.search-main > tbody,
.SearchCell table.search-main > tbody > tr,
.SearchCell table.search-main > tbody > tr > td {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
}

.SearchCell table.search-row {
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
    width: 100% !important;
    max-width: 100% !important;
    border: none !important;
    background: transparent !important;
}

.SearchCell table.search-row > tbody,
.SearchCell table.search-row > tbody > tr {
    display: contents !important;
}

.SearchCell table.search-row .search-label-cell {
    display: block !important;
    flex: 0 0 90px !important;
    width: 90px !important;
    min-width: 90px !important;
    max-width: 90px !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
}

.SearchCell .search-label {
    font-family: "Roboto Condensed", sans-serif !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    color: var(--navy) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    line-height: 1.4 !important;
    white-space: nowrap !important;
    margin: 0 !important;
    padding: 0 !important;
}

.SearchCell table.search-row .search-input-cell {
    display: block !important;
    flex: 1 1 auto !important;
    width: auto !important;
    max-width: 100% !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
}

.SearchCell input.search-input {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 46px !important;
    height: auto !important;
    box-sizing: border-box !important;
    background: var(--white) !important;
    border: 1px solid var(--border-light) !important;
    border-radius: 6px !important;
    padding: 12px 18px 12px 48px !important;
    font-family: "Roboto Condensed", sans-serif !important;
    font-size: 14px !important;
    color: var(--text-dark) !important;
    line-height: 1.4 !important;
    box-shadow: 0 2px 6px rgba(26, 42, 58, 0.04) !important;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='%231A2A3A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><line x1='4' y1='6' x2='20' y2='6'/><line x1='7' y1='12' x2='17' y2='12'/><line x1='10' y1='18' x2='14' y2='18'/></svg>") !important;
    background-repeat: no-repeat !important;
    background-position: 16px center !important;
    background-size: 22px 22px !important;
}

.SearchCell input.search-input:focus {
    outline: none !important;
    border-color: var(--gold) !important;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.18) !important;
}

.SearchCell input.search-input::placeholder {
    color: var(--text-muted) !important;
    font-style: italic !important;
}

.SearchCell table.search-row .search-submit-cell {
    display: block !important;
    flex: 0 0 130px !important;
    width: 130px !important;
    min-width: 130px !important;
    max-width: 130px !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
}

.SearchCell input.search-submit {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 46px !important;
    height: auto !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 12px 24px !important;
    background: var(--navy) !important;
    color: var(--white) !important;
    border: 1px solid var(--navy) !important;
    border-radius: 6px !important;
    font-family: "Roboto Condensed", sans-serif !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    text-align: center !important;
    cursor: pointer !important;
    box-shadow: 0 4px 12px rgba(26, 42, 58, 0.2) !important;
    transition: var(--transition) !important;
    white-space: nowrap !important;
    line-height: 1.3 !important;
}

.SearchCell input.search-submit:hover {
    background: var(--gold) !important;
    color: var(--navy) !important;
    border-color: var(--gold) !important;
    box-shadow: 0 6px 18px rgba(212, 175, 55, 0.4) !important;
}

/* ==========================================================
   «БИБЛИОГРАФИЧЕСКИЙ ПОИСК» — переключатель
   ========================================================== */
.SearchCell a.toggle-ext-search {
    display: inline-block !important;
    margin: 14px 0 0 0 !important;
    padding: 8px 0 !important;
    color: var(--navy) !important;
    font-family: "Roboto Condensed", sans-serif !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    text-decoration: none !important;
    border-bottom: 1px dashed transparent !important;
    transition: var(--transition) !important;
}

.SearchCell a.toggle-ext-search:hover {
    color: var(--gold-dark) !important;
    border-bottom-color: var(--gold-dark) !important;
}

.SearchCell a.toggle-ext-search::after {
    content: " ▼" !important;
    display: inline-block !important;
    font-size: 9px !important;
    color: var(--gold) !important;
    margin-left: 4px !important;
}

.SearchCell:has(#RestrictSearch[style*="display: block"]) a.toggle-ext-search::after {
    content: " ▲" !important;
}

.SearchCell img#ctrl_toggleExtendedSearchFields,
.SearchCell img[src*="on-off"],
.SearchCell img[src*="down.png"],
.SearchCell img[src*="up.png"] {
    display: none !important;
}

/* ==========================================================
   #RestrictSearch — Библиографический поиск
   ========================================================== */
.SearchCell #RestrictSearch {
    width: 100% !important;
    max-width: 100% !important;
    margin: 16px 0 0 0 !important;
    padding: 18px 20px !important;
    background: var(--ivory) !important;
    border: 1px solid var(--border-light) !important;
    border-left: 3px solid var(--gold) !important;
    border-radius: 6px !important;
    box-sizing: border-box !important;
    /* display: — управляет JS */
}

.SearchCell #RestrictSearch table.restrict-search,
.SearchCell #RestrictSearch table.restrict-search > tbody,
.SearchCell #RestrictSearch table.restrict-search > tbody > tr,
.SearchCell #RestrictSearch table.restrict-search > tbody > tr > td {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    background: transparent !important;
    box-sizing: border-box !important;
}

.SearchCell #RestrictSearch table.restrict-search > tbody > tr {
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: 16px !important;
    margin-bottom: 12px !important;
}

.SearchCell #RestrictSearch table.restrict-search > tbody > tr:last-child {
    margin-bottom: 0 !important;
}

.SearchCell #RestrictSearch .rs-label-cell {
    flex: 0 0 180px !important;
    width: 180px !important;
    min-width: 180px !important;
    max-width: 180px !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
}

.SearchCell #RestrictSearch .rs-label {
    font-family: "Roboto Condensed", sans-serif !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    color: var(--navy) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.4px !important;
    line-height: 1.4 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.SearchCell #RestrictSearch .rs-input-cell {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    flex: 1 1 auto !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    flex-wrap: nowrap !important;
}

.SearchCell #RestrictSearch .rs-between {
    display: inline-block !important;
    font-family: "Roboto Condensed", sans-serif !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    color: var(--navy) !important;
    white-space: nowrap !important;
    flex: 0 0 auto !important;
    padding: 0 4px !important;
}

.SearchCell #RestrictSearch input.rs-input-small,
.SearchCell #RestrictSearch input[name="DAT_S21P06"],
.SearchCell #RestrictSearch input[name="DAT_S21P07"],
.SearchCell #RestrictSearch input#ctrl_DP_S21P06,
.SearchCell #RestrictSearch input#ctrl_DP_S21P07 {
    display: block !important;
    flex: 1 1 auto !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    min-height: 40px !important;
    box-sizing: border-box !important;
    background: var(--white) !important;
    border: 1px solid var(--border-light) !important;
    border-radius: 4px !important;
    padding: 10px 14px !important;
    font-family: "Roboto Condensed", sans-serif !important;
    font-size: 13.5px !important;
    color: var(--text-dark) !important;
    box-shadow: 0 2px 6px rgba(26, 42, 58, 0.04) !important;
}

.SearchCell #RestrictSearch input.rs-input-small:focus,
.SearchCell #RestrictSearch input[name="DAT_S21P06"]:focus,
.SearchCell #RestrictSearch input[name="DAT_S21P07"]:focus,
.SearchCell #RestrictSearch input#ctrl_DP_S21P06:focus,
.SearchCell #RestrictSearch input#ctrl_DP_S21P07:focus {
    outline: none !important;
    border-color: var(--gold) !important;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.18) !important;
}

.SearchCell #RestrictSearch input.rs-checkbox {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    max-width: 20px !important;
    accent-color: var(--gold) !important;
    margin: 0 !important;
    cursor: pointer !important;
    flex: 0 0 auto !important;
}

.SearchCell #RestrictSearch select.rs-select {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: 40px !important;
    box-sizing: border-box !important;
    background: var(--white) !important;
    border: 1px solid var(--border-light) !important;
    border-radius: 4px !important;
    padding: 10px 14px !important;
    font-family: "Roboto Condensed", sans-serif !important;
    font-size: 13.5px !important;
    color: var(--text-dark) !important;
}

.SearchCell #RestrictSearch fieldset {
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    width: 100% !important;
}

.SearchCell #RestrictSearch legend {
    display: none !important;
}

.SearchCell #RestrictSearch fieldset input[type="text"],
.SearchCell #RestrictSearch fieldset select {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: 40px !important;
    box-sizing: border-box !important;
    background: var(--white) !important;
    border: 1px solid var(--border-light) !important;
    border-radius: 4px !important;
    padding: 10px 14px !important;
    font-family: "Roboto Condensed", sans-serif !important;
    font-size: 13.5px !important;
    color: var(--text-dark) !important;
}

/* ==========================================================
   ЕДИНЫЙ БЛОК: .ext-links
   ========================================================== */
.SearchCell table.ext-links {
    display: flex !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 12px 0 0 0 !important;
    padding: 12px 16px !important;
    background: var(--ivory) !important;
    border: 1px solid var(--border-light) !important;
    border-left: 3px solid var(--gold) !important;
    border-radius: 6px !important;
    box-sizing: border-box !important;
    gap: 24px !important;
    align-items: center !important;
    flex-wrap: wrap !important;
}

.SearchCell table.ext-links > tbody,
.SearchCell table.ext-links > tbody > tr {
    display: contents !important;
}

.SearchCell table.ext-links > tbody > tr > td {
    display: inline-block !important;
    width: auto !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    background: transparent !important;
    vertical-align: middle !important;
}

.SearchCell table.ext-links > tbody > tr > td:last-child {
    margin-left: auto !important;
    display: flex !important;
    align-items: center !important;
}

.SearchCell .ext-link {
    display: inline-block !important;
    margin: 0 !important;
    padding: 6px 0 !important;
    color: var(--navy) !important;
    font-family: "Roboto Condensed", sans-serif !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    cursor: pointer !important;
    border-bottom: 1px dashed transparent !important;
    transition: var(--transition) !important;
    white-space: nowrap !important;
}

.SearchCell .ext-link:hover {
    color: var(--gold-dark) !important;
    border-bottom-color: var(--gold-dark) !important;
}

.SearchCell input.rs-clear {
    display: block !important;
    width: auto !important;
    max-width: 140px !important;
    min-height: 36px !important;
    height: auto !important;
    padding: 8px 16px !important;
    margin: 0 0 0 auto !important;
    background: var(--white) !important;
    color: var(--navy) !important;
    border: 1px solid var(--navy) !important;
    border-radius: 4px !important;
    font-family: "Roboto Condensed", sans-serif !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    cursor: pointer !important;
    transition: var(--transition) !important;
    align-self: center !important;
}

.SearchCell input.rs-clear:hover {
    background: var(--navy) !important;
    color: var(--white) !important;
}

/* ==========================================================
   РЕЗУЛЬТАТЫ ПОИСКА — 3 КОЛОНКИ
   ========================================================== */
table.records_table,
table[style*="border:1px"],
table[style*="width:100%"],
.irbis-content > table,
body > table[style*="border:1px"] {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 18px !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    background: transparent !important;
    border: none !important;
}

@media (max-width: 1024px) {
    table.records_table,
    table[style*="border:1px"],
    table[style*="width:100%"],
    .irbis-content > table,
    body > table[style*="border:1px"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 640px) {
    table.records_table,
    table[style*="border:1px"],
    table[style*="width:100%"],
    .irbis-content > table,
    body > table[style*="border:1px"] {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }
}

table.records_table > tbody > tr,
table.records_table > tr,
table[style*="border:1px"] > tbody > tr,
table[style*="border:1px"] > tr,
.irbis-content > table > tbody > tr,
.irbis-content > table > tr,
body > table[style*="border:1px"] > tbody > tr {
    display: block !important;
    width: auto !important;
    max-width: 100% !important;
    background: var(--white) !important;
    border: 1px solid var(--border-light) !important;
    border-top: 3px solid var(--gold) !important;
    border-radius: 4px !important;
    padding: 16px !important;
    margin: 0 !important;
    box-shadow: 0 4px 14px rgba(26, 42, 58, 0.06) !important;
    transition: var(--transition);
    overflow: hidden !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
}

table.records_table > tbody > tr:hover,
table[style*="border:1px"] > tbody > tr:hover,
.irbis-content > table > tbody > tr:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 10px 22px rgba(212, 175, 55, 0.2) !important;
    border-color: var(--gold) !important;
}

table.records_table td,
table[style*="border:1px"] td,
.irbis-content > table td {
    display: block !important;
    width: auto !important;
    max-width: 100% !important;
    padding: 5px 0 !important;
    border: none !important;
    background: transparent !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
}

table.records_table td:first-child,
table[style*="border:1px"] td:first-child,
.irbis-content > table td:first-child {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
    margin-bottom: 12px !important;
    padding-bottom: 10px !important;
    border-bottom: 1px solid var(--border-light) !important;
}

table.records_table td:first-child b,
table[style*="border:1px"] td:first-child b {
    font-size: 14px !important;
    background: var(--ivory-dark) !important;
    padding: 3px 10px !important;
    border-radius: 3px !important;
    color: var(--navy) !important;
    font-weight: 700 !important;
}

table.records_table td:first-child a,
table[style*="border:1px"] td:first-child a {
    margin-left: auto !important;
}

table.records_table td[width="95%"],
table[style*="border:1px"] td[width="95%"],
.irbis-content > table td[width="95%"] {
    font-size: 14px !important;
    line-height: 1.55 !important;
    color: var(--text-dark) !important;
}

table.records_table td[width="95%"] b:first-of-type,
table[style*="border:1px"] td[width="95%"] b:first-of-type {
    font-family: "Roboto Condensed", sans-serif;
    font-size: 17px !important;
    font-weight: 700 !important;
    color: var(--navy) !important;
    display: block !important;
    margin: 6px 0 10px 0 !important;
    line-height: 1.35 !important;
    background: transparent !important;
    padding: 0 !important;
}

table.records_table td[width="95%"] a:first-of-type,
table[style*="border:1px"] td[width="95%"] a:first-of-type {
    font-size: 17px !important;
    font-weight: 700 !important;
    color: var(--navy) !important;
}

table.records_table td[width="95%"] a:first-of-type:hover,
table[style*="border:1px"] td[width="95%"] a:first-of-type:hover {
    color: var(--gold-dark) !important;
}

table.records_table td[width="95%"] b:not(:first-of-type),
table[style*="border:1px"] td[width="95%"] b:not(:first-of-type) {
    display: inline-block !important;
    background: var(--ivory-dark) !important;
    padding: 3px 10px !important;
    border-radius: 3px !important;
    font-size: 11.5px !important;
    font-weight: 500 !important;
    color: var(--navy) !important;
    margin: 4px 4px 4px 0 !important;
    border: 1px solid var(--border-light);
}

table.records_table td[width="95%"] a,
table[style*="border:1px"] td[width="95%"] a {
    color: var(--gold-dark) !important;
    font-size: 11.5px !important;
    background: var(--ivory) !important;
    padding: 3px 10px !important;
    border-radius: 3px !important;
    display: inline-block !important;
    margin: 3px 4px 3px 0 !important;
    border: 1px solid var(--border-light) !important;
}

table.records_table td[width="95%"] a:hover,
table[style*="border:1px"] td[width="95%"] a:hover {
    background: var(--gold) !important;
    color: var(--navy) !important;
    border-color: var(--gold) !important;
}

/* ==========================================================
   ФОРМЫ (общие)
   ========================================================== */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="search"],
input[type="tel"],
select,
textarea {
    display: inline-block;
    width: auto;
    max-width: 100%;
    min-width: 0;
    background: var(--white) !important;
    border: 1px solid var(--border-light) !important;
    border-radius: 4px !important;
    padding: 10px 14px !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
    color: var(--text-dark) !important;
    font-family: "Roboto", sans-serif !important;
    transition: var(--transition);
    vertical-align: middle;
    box-sizing: border-box;
    box-shadow: 0 1px 3px rgba(180, 180, 180, 0.5);
}

input[type="checkbox"],
input[type="radio"] {
    width: 16px !important;
    height: 16px !important;
    min-width: 16px !important;
    max-width: 16px !important;
    accent-color: var(--gold) !important;
    margin-right: 6px !important;
    vertical-align: middle;
    flex-shrink: 0;
}

label {
    display: inline-block;
    font-family: "Roboto Condensed", sans-serif;
    color: var(--navy);
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 4px;
    max-width: 100%;
    text-transform: uppercase;
    letter-spacing: 0.2px;
}

button,
.btn {
    display: inline-block;
    width: auto !important;
    max-width: 100%;
    background: var(--navy) !important;
    color: var(--white) !important;
    border: 1px solid var(--navy) !important;
    border-radius: 4px !important;
    padding: 10px 22px !important;
    font-family: "Roboto Condensed", sans-serif !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer !important;
    transition: var(--transition);
    vertical-align: middle;
    line-height: 1.3 !important;
}

button:hover,
.btn:hover {
    background: var(--gold) !important;
    color: var(--navy) !important;
    border-color: var(--gold) !important;
}

/* ==========================================================
   ФУТЕР — по центру
   ========================================================== */
.footer {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 24px auto 0 auto !important;
    padding: 20px 16px !important;
    background: transparent !important;
    border-top: 1px solid var(--border-light) !important;
    text-align: center !important;
    box-sizing: border-box !important;
    float: none !important;
    position: static !important;
}

.footer > center,
.footer > div,
.footer .container {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 0 !important;
    text-align: center !important;
    float: none !important;
}

.footer center a,
.footer .container a,
.footer a {
    display: inline-block !important;
    float: none !important;
    margin: 4px 12px !important;
    padding: 6px 14px !important;
    color: var(--navy) !important;
    font-family: "Roboto Condensed", sans-serif !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    text-decoration: none !important;
    border-radius: 4px !important;
    border: 1px solid transparent !important;
    transition: var(--transition) !important;
    vertical-align: middle !important;
}

.footer a:hover {
    color: var(--gold-dark) !important;
    border-color: var(--gold) !important;
    background: rgba(212, 175, 55, 0.08) !important;
}

.footer .container {
    margin-top: 16px !important;
    padding-top: 16px !important;
    border-top: 1px solid var(--border-light) !important;
    font-family: "Roboto Condensed", sans-serif !important;
    font-size: 12px !important;
    color: var(--text-muted) !important;
    text-align: center !important;
}

/* ==========================================================
   СКРЫТИЕ СЛУЖЕБНЫХ ЭЛЕМЕНТОВ
   ========================================================== */
#ctrl_footerPortionLinksBar:empty,
#ctrl_side_search_panel:empty,
#ctrl_side_search_panel_header[style*="display: none"] {
    display: none !important;
}

.SearchCell > br,
.SearchCell > span[style*="display:none"] + br {
    display: none !important;
}

/* ==========================================================
   АДАПТИВ
   ========================================================== */
@media (max-width: 768px) {
    .SearchCell table.search-row {
        flex-wrap: wrap !important;
    }
    .SearchCell table.search-row .search-label-cell {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        padding-bottom: 6px !important;
    }
    .SearchCell table.search-row .search-submit-cell {
        flex: 0 0 130px !important;
    }
    .SearchCell #RestrictSearch table.restrict-search > tbody > tr {
        flex-wrap: wrap !important;
    }
    .SearchCell #RestrictSearch .rs-label-cell {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        margin-bottom: 4px !important;
    }
    .SearchCell #RestrictSearch .rs-input-cell {
        flex: 0 0 100% !important;
    }
    .SearchCell table.ext-links {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 8px !important;
    }
    .SearchCell input.rs-clear {
        margin-left: 0 !important;
        margin-top: 8px !important;
    }
}
