/* Brand Theme — GLPI 11.x — Инвертированная схема */

:root {
    --glpi-helpdesk-header: #1a1f2e;
    --glpi-helpdesk-tiles-section-bg: #f5f5f5;

    --tblr-primary:          #1a1f2e;
    --tblr-primary-rgb:      26, 31, 46;
    --tblr-primary-fg:       #ffffff;
    --tblr-primary-darken:   #252b3b;
    --tblr-link-color:       #1a1f2e;
    --tblr-link-hover-color: #252b3b;
    --glpi-logo-light: url('/pics/logos/logo-GLPI-250-black.png') !important;
    --glpi-logo-dark: url('/pics/logos/logo-GLPI-250-black.png') !important;
    --glpi-logo-dark-login: url('/pics/logos/logo-GLPI-250-black.png') !important;
    --glpi-logo-light-login: url('/pics/logos/logo-GLPI-250-black.png') !important;
    --glpi-logo-light-reduced: url("/pics/logos/logo-GLPI-100-white.png") !important;
    --glpi-logo-dark-reduced: url("/pics/logos/logo-GLPI-100-white.png") !important;
}

/* ── Sidebar — светлый ── */
.sidebar {
    background-color: #ffffff !important;
    border-right: 1px solid #e0e3ea !important;
}

.sidebar .nav-link,
.sidebar .nav-link span,
.sidebar .nav-link i,
.sidebar .nav-link svg,
.sidebar .menu-label,
.sidebar .navbar-brand,
.sidebar .navbar-toggler,
.sidebar .btn-ghost-secondary,
.sidebar .reduce-menu {
    color: #1a1f2e !important;
}

.sidebar #navbar-menu .nav-item .nav-link { border-radius: 6px; margin: 1px 8px; }

.sidebar #navbar-menu .nav-item:hover .nav-link {
    color: #1a1f2e !important;
    background-color: rgba(26,31,46,0.08) !important;
}

.sidebar #navbar-menu .nav-item .nav-link.active,
.sidebar #navbar-menu .nav-item .nav-link.show {
    color: #ffffff !important;
    background-color: #8b0000 !important;
}

.sidebar #navbar-menu .nav-item .nav-link.active span,
.sidebar #navbar-menu .nav-item .nav-link.active i,
.sidebar #navbar-menu .nav-item .nav-link.show span,
.sidebar #navbar-menu .nav-item .nav-link.show i { color: #fff !important; }

/* Подменю */
.sidebar #navbar-menu .nav-item .nav-link.active + .dropdown-menu,
.sidebar #navbar-menu .nav-item .nav-link.show + .dropdown-menu {
    background-color: #e0e3ea !important;
}

.sidebar #navbar-menu .nav-item .nav-link.active + .dropdown-menu .dropdown-item,
.sidebar #navbar-menu .nav-item .nav-link.show + .dropdown-menu .dropdown-item {
    color: #8b0000 !important;
}

.sidebar #navbar-menu .nav-item .nav-link.active + .dropdown-menu .dropdown-item:hover,
.sidebar #navbar-menu .nav-item .nav-link.show + .dropdown-menu .dropdown-item:hover {
    color: #ffffff !important;
    background-color: #1a1f2e !important;
}

.sidebar #navbar-menu .nav-item .nav-link.active + .dropdown-menu .dropdown-item.active {
    color: #fff !important;
    background-color: #8b0000 !important;
}

/* ── Логотип в сайдбаре (развёрнутый) ── */
.navbar-brand {
    background-image: none !important;
    padding: 12px 16px !important;
    width: 100% !important;
    min-height: 143px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
}

/* Скрываем всё внутри .navbar-brand кроме .glpi-logo */
.navbar-brand > *:not(.glpi-logo) { display: none !important; }

/* Логотип — развёрнутый сайдбар: на всю ширину */
.navbar-brand .glpi-logo {
    display: block !important;
    visibility: visible !important;
    width: 100% !important;
    height: 132px !important;
    background-image: url('/pics/logos/logo-GLPI-250-black.png') !important;
    background-repeat: no-repeat !important;
    background-size: contain !important;
    background-position: center center !important;
    margin: 0 !important;
    animation: none !important;
}

/* Логотип — свёрнутый сайдбар: иконка по центру */
body.navbar-collapsed .navbar-brand {
    margin: 0 !important;
    width: 100% !important;
    padding: 12px 0 !important;
    min-height: 56px !important;
    max-height: 72px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}
body.navbar-collapsed .navbar-brand .glpi-logo {
    width: 36px !important;
    height: 36px !important;
    background-image: url('/pics/logos/logo-GLPI-100-white.png') !important;
    background-size: contain !important;
    background-position: center center !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
}

/* ── Top bar ── */
.sidebar ~ .navbar {
    background-color: #ffffff !important;
    border-bottom: 1px solid #e0e3ea !important;
    box-shadow: 0 2px 8px rgba(26,31,46,.08);
}

/* ── Page body — тёмно-синий фон ── */
.page-wrapper,
.page-body {
    background-color: #1a1f2e !important;
}

/* ── Плитки (карточки) — белые ── */
.card {
    background-color: #ffffff !important;
    border: none !important;
    border-radius: 10px !important;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15) !important;
    color: #1a1f2e !important;
}

.card-header {
    background-color: #ffffff !important;
    border-bottom: 1px solid #e0e3ea !important;
    color: #1a1f2e !important;
    font-weight: 600;
}

/* ── Buttons ── */
.btn-primary {
    background-color: #8b0000 !important;
    border-color: #8b0000 !important;
    color: #fff !important;
}
.btn-primary:hover, .btn-primary:focus {
    background-color: #c40026 !important;
    border-color: #c40026 !important;
}
.btn-outline-primary { color: #1a1f2e !important; border-color: #1a1f2e !important; }
.btn-outline-primary:hover { background-color: #1a1f2e !important; color: #fff !important; }

/* ── Links ── */
.page-body a:not(.btn):not(.nav-link):not(.dropdown-item) { color: #8b0000; }
thead a { color: #ffffff !important; }
.table thead th a { color: #ffffff !important; }

/* ── Tables ── */
.table thead th { background-color: #1a1f2e !important; color: #fff !important; border: none !important; }
.table-hover tbody tr:hover > td { background-color: rgba(26,31,46,.05) !important; }

/* ── Forms ── */
.form-control:focus, .form-select:focus {
    border-color: #8b0000 !important;
    box-shadow: 0 0 0 3px rgba(232,0,45,0.15) !important;
}
.form-check-input:checked { background-color: #8b0000 !important; border-color: #8b0000 !important; }

/* ── Misc ── */
.badge.bg-primary { background-color: #8b0000 !important; }
.card-status-start { background-color: #8b0000 !important; }
.nav-tabs .nav-link.active { color: #8b0000 !important; border-bottom-color: #8b0000 !important; font-weight: 600; }
.page-item.active .page-link { background-color: #8b0000 !important; border-color: #8b0000 !important; }
.progress-bar { background-color: #8b0000 !important; }

/* ── Страница логина — белый фон ── */
body.welcome-anonymous {
    background-color: #e8f0e9 !important;
    position: relative !important;
    min-height: 100vh !important;
}

.page-anonymous { position: relative !important; z-index: 1 !important; }
.page-anonymous { position: relative !important; z-index: 1 !important; }
.page-anonymous .card.card-md {
    border-radius: 16px !important;
    border: none !important;
    background-color: #f3f5f8 !important;
    box-shadow: 0 8px 40px rgba(0,0,0,0.15) !important;
}

.page-anonymous .card-header {
    background: #f3f5f8 !important;
    color: #1a1f2e !important;
    font-weight: 700 !important;
    border-bottom: 2px solid #e8002d !important;
    padding: 20px !important;
    border-radius: 16px 16px 0 0 !important;
}
.page-anonymous .card-header * { color: #1a1f2e !important; }

/* Поля ввода на странице авторизации — текст хорошо видимый на светлом фоне */
.page-anonymous .card.card-md input:not([type="checkbox"]):not([type="radio"]),
.page-anonymous .card.card-md select,
.page-anonymous .card.card-md textarea {
    background-color: #ffffff !important;
    color: #1a1f2e !important;
    border: 1px solid #c5cad4 !important;
}
.page-anonymous .card.card-md input:not([type="checkbox"]):not([type="radio"]):focus,
.page-anonymous .card.card-md select:focus {
    color: #1a1f2e !important;
    border-color: #e8002d !important;
    box-shadow: 0 0 0 0.2rem rgba(232,0,45,0.15) !important;
}
.page-anonymous .card.card-md label {
    color: #1a1f2e !important;
}
.page-anonymous .card.card-md input[type="checkbox"]:checked {
    background-color: #8b0000 !important;
    border-color: #8b0000 !important;
}
.page-anonymous .card.card-md a:not(.btn) {
    color: #1a1f2e !important;
}

.page-anonymous .card-body {
    background-color: #f3f5f8 !important;
}

.page-anonymous .form-label { color: rgba(255,255,255,0.8) !important; }

.page-anonymous .form-control,
.page-anonymous .form-select {
    background-color: #252b3b !important;
    border: 1px solid #2e364a !important;
    color: #ffffff !important;
    border-radius: 8px !important;
}
.page-anonymous .form-control:focus, .page-anonymous .form-select:focus {
    border-color: #8b0000 !important;
    box-shadow: 0 0 0 3px rgba(232,0,45,0.15) !important;
}
.page-anonymous .form-check-label { color: #8b0000 !important; font-weight: 600 !important; }
.page-anonymous .form-check-input { border: 1px solid #8b0000 !important; }
.page-anonymous .form-check-input:checked { background-color: #8b0000 !important; border-color: #8b0000 !important; }

.page-anonymous .btn-primary {
    background: linear-gradient(135deg, #e8002d 0%, #c40026 100%) !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 12px !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 15px rgba(232,0,45,0.35) !important;
}
.page-anonymous .btn-primary:hover { transform: translateY(-1px) !important; }

.page-anonymous a { color: #8b0000 !important; }
.page-anonymous .text-muted { color: rgba(26,31,46,0.5) !important; }
.page-anonymous .forgot_password a { color: #8b0000 !important; }

/* Анимация логотипа */
span.glpi-logo {
    display: block !important;
    width: 420px !important;
    height: 230px !important;
    background-color: transparent !important;
    margin: 0 auto 16px !important;
    animation: logoAppear 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) both !important;
}
@keyframes logoAppear {
    0%   { opacity: 0; transform: scale(0.3) rotate(-15deg); }
    100% { opacity: 1; transform: scale(1) rotate(0deg); }
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: #2e364a; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #e8002d; }

/* ── Плитки — исправление текста и рамок ── */
.card,
.card p, .card span, .card div, .card td, .card li, .card label, .card h1, .card h2, .card h3, .card h4, .card h5, .card h6 {
    color: #1a1f2e !important;
}

.card {
    border: 1px solid #e0e3ea !important;
}

/* Исключение — кнопки и бейджи внутри карточек */
.card .btn-primary,
.card .btn-primary * { color: #ffffff !important; }
.card .badge { color: #ffffff !important; }
.card a:not(.btn) { color: #1a1f2e !important; }
.card .table thead th a { color: #ffffff !important; }

/* (блоки navbar-brand объединены выше) */

/* Заголовки виджетов личного вида */
.dashboard-card .card-header,
.tab-content .card-header,
.card-header h3,
.card-header .card-title,

/* Заголовки виджетов личного вида */
.table thead tr:first-child th[colspan] {
}
.table thead tr:first-child th[colspan] a {
}

/* Ссылки в заголовках таблиц */
.table thead tr:first-child th[colspan] a,
.table thead th[colspan] a {
}

table.table thead tr:first-child th[colspan] a:not(.btn):not(.nav-link):not(.dropdown-item) {
}

table.table thead tr:first-child th[colspan] a:not(.btn):not(.nav-link):not(.dropdown-item) {
}

.card table thead tr th a,
.card-table thead tr th a,
.table-responsive table thead tr th a {
}




.card table thead th a, .card table thead th { color: #ffffff !important; }

html body .card table thead th a { color: #ffffff !important; }

.card thead th, .card thead th a { color: #ffffff !important; }

.card .table thead tr th a, .card .table thead tr th { color: #ffffff !important; }

.card .table.table-hover thead tr th a { color: #ffffff !important; }

.card .table.table-borderless.table-striped.table-hover thead tr th a { color: #ffffff !important; }

.card .table thead tr th a, .card table thead tr th a { color: #ffffff !important; }

.card table.table thead tr th a { color: #ffffff !important; }

.card table thead tr.noHover th a { color: #ffffff !important; }

.card .table.table-striped.card-table.table-hover thead tr th a,
.card .table.table-hover.table-striped.card-table thead tr th a,
.card .table.table-hover.table-striped.table-bordered thead tr th a,

/* Helpdesk — скрываем логотип в хедере */
body.helpdesk .navbar-brand { display: none !important; }

/* Helpdesk — логотип по центру баннера */
.helpdesk-center-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 0 40px;
}
.helpdesk-center-logo img {
    width: 420px;
    max-width: 80vw;
    animation: logoPulse 3s ease-in-out infinite;
    filter: drop-shadow(0 0 0px rgba(232,0,45,0));
}
@keyframes logoPulse {
    0%   { filter: drop-shadow(0 0 0px rgba(232,0,45,0)); }
    50%  { filter: drop-shadow(0 0 18px rgba(232,0,45,0.7)) drop-shadow(0 0 35px rgba(26,31,46,0.4)); }
    100% { filter: drop-shadow(0 0 0px rgba(232,0,45,0)); }
}

/* Helpdesk banner — белый фон, меньше высоты */
body.helpdesk .search-banner {
    background-color: #e8f0e9 !important;
    position: relative;
    overflow: hidden;
}
body.helpdesk .search-banner canvas {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
    pointer-events: none;
}
body.helpdesk .search-banner-content {
    padding-top: 40px !important;
    padding-bottom: 40px !important;
    position: relative;
    z-index: 1;
}
body.helpdesk .helpdesk-center-logo img {
    width: 320px;
    max-width: 60vw;
}
body.helpdesk .helpdesk-center-logo {
    padding: 20px 0 10px;
}
body.helpdesk .tiles-banner {
    padding-top: 30px !important;
    padding-bottom: 40px !important;
}

/* Helpdesk banner — увеличиваем высоту */
body.helpdesk .search-banner-content {
    padding-top: 80px !important;
    padding-bottom: 80px !important;
}
body.helpdesk .helpdesk-center-logo img {
    width: 420px !important;
    max-width: 70vw !important;
}
body.helpdesk .helpdesk-center-logo {
    padding: 30px 0 20px !important;
}

/* Helpdesk banner — фиксируем высоту */
body.helpdesk .search-banner {
    min-height: 280px !important;
}
body.helpdesk .search-banner-content {
    padding-top: 60px !important;
    padding-bottom: 60px !important;
    min-height: 280px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Helpdesk banner — фиксируем высоту */
body.helpdesk .search-banner {
    min-height: 280px !important;
}
body.helpdesk .search-banner-content {
    padding-top: 60px !important;
    padding-bottom: 60px !important;
    min-height: 280px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Helpdesk — скрываем строку поиска визуально но оставляем в DOM */
body.helpdesk .helpdesk-hidden-search {
    position: absolute !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
}

/* Анимация логотипа на странице авторизации */
span.glpi-logo {
    animation: logoPulse 3s ease-in-out infinite !important;
}
@keyframes logoPulse {
    0%   { filter: drop-shadow(0 0 0px rgba(232,0,45,0)); }
    50%  { filter: drop-shadow(0 0 20px rgba(232,0,45,0.8)) drop-shadow(0 0 40px rgba(26,31,46,0.5)); }
    100% { filter: drop-shadow(0 0 0px rgba(232,0,45,0)); }
}

/* Helpdesk navbar — белый фон как у техника */
body.helpdesk .navbar {
    background-color: #ffffff !important;
    border-bottom: 1px solid #e0e3ea !important;
    box-shadow: 0 2px 8px rgba(26,31,46,.08) !important;
}
body.helpdesk .navbar .nav-link,
body.helpdesk .navbar a {
    color: #1a1f2e !important;
}
body.helpdesk .navbar .nav-link:hover {
    color: #8b0000 !important;
}
body.helpdesk .navbar .nav-link.active {
    color: #8b0000 !important;
}

/* Helpdesk все страницы — светло-зелёный фон */
body.helpdesk .page-wrapper,
body.helpdesk .page-body {
    background-color: #e8f0e9 !important;
}

/* Canvas только для helpdesk */
canvas.helpdesk-only { display: none; }
body.helpdesk canvas.helpdesk-only { display: block; }

/* Helpdesk контент поверх canvas */
body.helpdesk .page { position: relative; z-index: 1; }
body.helpdesk .navbar { position: relative; z-index: 2; }

/* Helpdesk — прозрачный фон страницы, цвет на canvas */
body.helpdesk,
body.helpdesk .page-wrapper,
body.helpdesk .page-body {
    background-color: transparent !important;
}
body.helpdesk canvas.helpdesk-only {
    background-color: #e8f0e9;
}

/* Helpdesk canvas — приглушить анимацию */
body.helpdesk canvas.helpdesk-only {
    opacity: 0.25 !important;
}

/* Helpdesk — dropdown меню поверх контента */
body.helpdesk .dropdown-menu {
    z-index: 1050 !important;
}
body.helpdesk .navbar {
    z-index: 1040 !important;
}

/* Матрица для всех страниц */
canvas.glpi-matrix {
    opacity: 0.15 !important;
    background-color: #e8f0e9;
    display: block !important;
}
/* Страница техника/администратора — прозрачный фон */
body.central .page-wrapper,
body.central .page-body {
    background-color: transparent !important;
}
body.central {
    background-color: #e8f0e9 !important;
}

/* Календарь журнала - текущая дата */
.card span[style*="background:#1a1f2e"] {
    color: #fff !important;
}
