/* ===== MAIN ===== */

body {
    background: #0f1115;
    color: #e4e6eb;
    font-family: "Inter", sans-serif;
}

/* ссылки */

a {
    color: #6403FF;
}

a:hover {
    color: #7621FF;
}


/* ===== NAVBAR ===== */

.navbar,
.dashboard-header .navbar {
    background: #12151c;
    border-bottom: 1px solid #242933;
}

.navbar .nav-link {
    color: #cfd3da;
}

.navbar .nav-link:hover {
    color: #ffffff;
}

@media (max-width: 991.98px) {

    .dashboard-header .navbar {
        justify-content: center !important;
        min-height: 72px !important;
        height: 72px !important;
        padding: 6px 12px !important;
    }

    .dashboard-header .navbar-brand {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;

        width: 100% !important;
        height: 64px !important;

        padding: 0 !important;
        margin: 0 !important;
    }

    .dashboard-header .navbar-brand img {
        width: 150px !important;
        height: auto !important;

        max-width: 150px !important;
        max-height: 60px !important;

        display: block !important;
    }

    /* Чтобы контент начинался ниже fixed-top header */
    .dashboard-main-wrapper {
        padding-top: 72px !important;
    }
}


/* ===== SIDEBAR ===== */

.nav-left-sidebar {
    background: #12151c;
    border-right: 1px solid #242933;
}

.nav-left-sidebar .nav-link {
    color: #aab0bb;
    border-radius: 8px;
}

.nav-left-sidebar .nav-link:hover {
    background: #1f2430;
    color: #ffffff;
}


/* ===== CARDS ===== */

.card {
    background: #1b1f27;
    border: 1px solid #2b303a;
    border-radius: 14px;
    color: #e4e6eb;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid #2b303a;
}

.my-card-header {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.my-card-header .title-badge {
    background: #6403FF20;
    padding: 4px 12px;
    border-radius: 40px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #6403FF;
    border: 1px solid #6403FF40;
}


/* ===== TABLES ===== */

.table {
    color: #e4e6eb;
}

.table thead th {
    border-bottom: 1px solid #2b303a;
}

.table td,
.table th {
    border-top: 1px solid #2b303a;
}


/* ===== INPUTS ===== */

.form-control {
    background: #1b1f27;
    border: 1px solid #2b303a;
    color: #e4e6eb;
    border-radius: 8px;
}

.form-control:focus {
    background: #1b1f27;
    border-color: #6403FF;
    color: #ffffff;
    box-shadow: none;
}

/* ===== TEXTAREA FIX ===== */

/* Основной стиль для всех textarea */
textarea,
textarea.form-control {
    background: #1b1f27 !important;
    border: 1px solid #2b303a !important;
    color: #e4e6eb !important;
    border-radius: 8px;
    transition: border-color 0.2s ease;
}

/* При фокусе — РЫЖАЯ обводка как у кнопок */
textarea:focus,
textarea.form-control:focus {
    background: #1b1f27 !important;
    border-color: #6403FF !important; /* Рыжий, как у btn-primary */
    color: #ffffff !important;
    outline: none;
}

/* Плейсхолдер */
textarea::placeholder,
textarea.form-control::placeholder {
    color: #6b7080 !important;
}

textarea:focus::placeholder,
textarea.form-control:focus::placeholder {
    color: #8a90a0 !important;
}


/* ===== BUTTONS ===== */

.btn-primary {
    background: #6403FF;
    border: none;
    border-radius: 8px;
}

.btn-primary:hover {
    opacity: 0.9;
}


/* ===== DROPDOWN ===== */

.dropdown-menu {
    background: #1b1f27;
    border: 1px solid #2b303a;
}

.dropdown-item {
    color: #cfd3da;
}

.dropdown-item:hover {
    background: #242933;
    color: #fff;
}


/* ===== SIDEBAR ===== */

.nav-left-sidebar {
    background: #12151c;
    border-right: 1px solid #242933;
}

.nav-left-sidebar .nav-link {
    color: #aab0bb;
    border-radius: 8px;
}

.nav-left-sidebar .nav-link:hover {
    background: #1f2430;
    color: #ffffff;
}


/* ===== SIDEBAR MENU ===== */

/* Десктоп — профиль сверху, меню снизу */
@media (min-width: 992px) {
    .nav-left-sidebar .navbar-collapse {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        width: 100%;
    }
}

/* Мобильное меню */
@media (max-width: 991.98px) {
    .nav-left-sidebar .navbar-collapse.show {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .nav-left-sidebar .navbar-collapse:not(.show) {
        display: none !important;
    }
}

.nav-left-sidebar .navbar-collapse > .navbar-nav {
    width: 100%;
    flex: 0 0 auto;
}

/* ===== PROFILE ===== */

.sidebar-profile {
    width: 100%;
    padding: 10px 8px;
    margin-bottom: 8px;
    border-bottom: 1px solid #242933;
    box-sizing: border-box;
}

.sidebar-profile-name {
    width: 100%;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;

    padding: 10px 8px;
    margin: 0;

    border-radius: 3px;

    color: #ffffff !important;
    text-decoration: none !important;

    box-sizing: border-box;
    cursor: pointer;

    transition:
            background 0.15s ease,
            color 0.15s ease;
}

.sidebar-profile-name:hover {
    background: #242849 !important;
    color: #ffffff !important;
    text-decoration: none !important;
}

.sidebar-profile-name.active {
    background: #242849 !important;
    color: #ffffff !important;
}


/* ===== AVATAR ===== */

.sidebar-profile-avatar {
    width: 76px !important;
    height: 76px !important;

    min-width: 76px !important;
    min-height: 76px !important;

    max-width: 76px !important;
    max-height: 76px !important;

    margin-bottom: 8px !important;

    border-radius: 50% !important;
    overflow: hidden !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    background: #1b1f27 !important;
    border: 2px solid #2b303a !important;

    color: #7d8495 !important;
    font-size: 30px !important;

    flex-shrink: 0 !important;
    box-sizing: border-box !important;
}

.sidebar-profile-avatar img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}


/* ===== NAME ===== */

.sidebar-profile-name > span {
    display: block;
    width: 100%;

    color: inherit;

    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;

    text-align: center;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}


/* ===== MOBILE ===== */

@media (max-width: 991.98px) {

    .sidebar-profile {
        padding: 6px 5px;
    }

    .sidebar-profile-name {
        padding: 7px 5px;
    }

    .sidebar-profile-avatar {
        width: 54px !important;
        height: 54px !important;

        min-width: 54px !important;
        min-height: 54px !important;

        max-width: 54px !important;
        max-height: 54px !important;

        margin-bottom: 5px !important;

        font-size: 22px !important;
    }

    .sidebar-profile-name > span {
        font-size: 13px;
    }
}


/* ===== MODALS ===== */

.modal-content {
    background: #1b1f27;
    border: 1px solid #2b303a;
}

.modal-header {
    border-bottom: 1px solid #2b303a;
}
.modal-header h5 {
    color: #a4aadb;
}
.modal-header button {
    color: #a4aadb;
}
.modal-header button:hover {
    color: #a4aadb;
}

.modal-footer {
    border-top: 1px solid #2b303a;
}

@media (max-width: 767.98px) {
    .modal-dialog {
        display: flex;
        align-items: center;
        min-height: calc(100% - 1rem);
        margin: 0.5rem auto;
    }

    .modal-content {
        width: 100%;
    }
}


/* ===== SCROLLBAR ===== */

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #0f1115;
}

::-webkit-scrollbar-thumb {
    background: #2b303a;
    border-radius: 10px;
}

/* ===== DATATABLE WRAPPER ===== */

.dataTables_wrapper {
    color: #e4e6eb;
}

/* ===== TABLE ===== */

table.dataTable {
    background: #1b1f27;
    border: 1px solid #2b303a;
    border-radius: 12px;
}

table.dataTable thead th {
    background: #161a22;
    color: #cfd3da;
    border-bottom: 1px solid #2b303a;
}

table.dataTable tbody td {
    border-top: 1px solid #2b303a;
}

table.dataTable tbody tr:hover {
    background: #242933;
}

/* ===== PAGINATION ===== */

.dataTables_wrapper .dataTables_paginate .paginate_button {
    background: #1b1f27;
    border: 1px solid #2b303a;
    color: #cfd3da !important;
    border-radius: 6px;
    margin: 2px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #242933;
    color: #fff !important;
    border: 1px solid #2b303a;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: #6403FF;
    border: none;
    color: #fff !important;
}

/* ===== SEARCH ===== */

.dataTables_wrapper .dataTables_filter input {
    background: #1b1f27;
    border: 1px solid #2b303a;
    color: #e4e6eb;
    border-radius: 8px;
    padding: 6px 10px;
}

.dataTables_wrapper .dataTables_filter input:focus {
    outline: none;
    border-color: #6403FF;
}

/* ===== LENGTH SELECT ===== */

.dataTables_wrapper .dataTables_length select {
    background: #1b1f27;
    border: 1px solid #2b303a;
    color: #e4e6eb;
    border-radius: 8px;
}

/* ===== INFO TEXT ===== */

.dataTables_wrapper .dataTables_info {
    color: #aab0bb;
}

/* ===== PROCESSING ===== */

.dataTables_processing {
    background: #1b1f27;
    color: #fff;
    border: 1px solid #2b303a;
    border-radius: 8px;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: #252b38 !important;
}

.table-striped tbody tr:nth-of-type(even) {
    background-color: #1b1f27 !important;
}

table.table-bordered.dataTable th, table.table-bordered.dataTable td {
    border-right-color: #20252e;
}

.load-background
{
    width: 100%;
    height: 100%;
    top: 0;
    margin: 0;
    background: rgba(0, 0, 0, 0.6);
    position: fixed;
    z-index: 1099;
}
.load-background .loader
{
    position: absolute;
    top: calc( 50% - 100px );
    left: calc( 50% - 100px );
}

.hidden
{
    display: none;
}

.text-black
{
    color: #3d405c;
}

.underline
{
    text-decoration: underline;
}

.field
{

}
.field .title
{
    margin-bottom: 2px;
    font-size: 14px;
}
.field .title sub
{
    font-weight: bold;
    font-size: 24px;
    color: #CF3131;
}
.field .error
{
    margin-top: 2px;
    text-align: left;
    font-size: 13px;
    color: #CF3131;
}
.field textarea
{
    resize: none;
}
.field .pretty
{
    vertical-align: middle;
}
.field .action
{
    cursor: pointer;
}

.calendar-error, .calendar-error:hover
{
    background-color: #CF3131 !important;
    border: 2px solid #FFFFFF !important;
    color: #fff !important;;
}

.pointer
{
    cursor: pointer;
}

.cursor-help
{
    cursor: help;
}

.no-caret
{
    caret-color: transparent;
}


.user-data
{
    font-size: 18px;
    font-weight: bold;
}

.modal
{

}
.modal [data-block=fields]
{

}
.modal [data-block=process]
{
    margin-top: 15px;
}
.modal [data-block=process] .alert
{
    margin-bottom: 0;
}

.modal-md
{
    max-width: 675px
}

.modal-600
{
    max-width: 600px
}

#showModal
{

}
#showModal .modal-body
{
    background-color: #EFEFF6;
}
#showModal .modal-body .card
{
    margin-bottom: 0;
}

#errorModal
{

}
#errorModal [data-block=text]
{
    margin-bottom: 0;
}

.toast
{
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}

.hint
{

}

.hint p
{
    margin: 0 0 10px 0;
    font-size: 15px;
    text-align: justify;
}

.empty-text
{
    color: #888888;
    text-align: center;
    font-size: 16px;
}

#dataTable .alert
{
    margin-bottom: 0;
}

/* ===== DATERANGEPICKER DARK THEME ===== */

.daterangepicker {
    background: #1b1f27;
    border: 1px solid #2b303a;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.daterangepicker:before,
.daterangepicker:after {
    border-bottom-color: #2b303a;
}

/* Календари */
.daterangepicker .calendar-table {
    background: #1b1f27;
    border-color: #2b303a;
}

.daterangepicker td.off,
.daterangepicker td.off.in-range,
.daterangepicker td.off.start-date,
.daterangepicker td.off.end-date {
    background: #12151c;
    color: #5a6070;
}

.daterangepicker td.available:hover,
.daterangepicker th.available:hover {
    background: #242933;
}

/* Выбранные даты */
.daterangepicker td.in-range {
    background: #2a1f4a;
    color: #e4e6eb;
}

.daterangepicker td.active,
.daterangepicker td.active:hover {
    background: #6403FF;
    color: #fff;
}

/* Заголовки месяцев */
.daterangepicker .calendar-table th,
.daterangepicker .calendar-table td {
    color: #e4e6eb;
}

.daterangepicker .calendar-table th {
    background: #12151c;
    border-color: #2b303a;
}

.daterangepicker th.month {
    color: #e4e6eb;
    background: #1b1f27;
}

/* Навигационные стрелки */
.daterangepicker .next i,
.daterangepicker .prev i {
    color: #6403FF;
}

.daterangepicker .next.available:hover i,
.daterangepicker .prev.available:hover i {
    color: #7621FF;
}

/* Селекторы месяца/года (dropdowns) */
.daterangepicker select {
    background: #1b1f27;
    border: 1px solid #2b303a;
    color: #e4e6eb;
    border-radius: 6px;
    padding: 4px;
}

.daterangepicker select:focus {
    outline: none;
    border-color: #6403FF;
}

/* Кнопки Apply / Cancel */
.daterangepicker .drp-buttons {
    border-top-color: #2b303a;
}

.daterangepicker .btn {
    background: #1b1f27;
    border: 1px solid #2b303a;
    color: #e4e6eb;
    border-radius: 8px;
}

.daterangepicker .btn:hover {
    background: #242933;
}

.daterangepicker .btn-primary {
    background: #6403FF;
    border: none;
    color: #fff;
}

.daterangepicker .btn-primary:hover {
    background: #7621FF;
}

/* Блок выбранного диапазона (слева) */
.daterangepicker .drp-calendar.left,
.daterangepicker .drp-calendar.right {
    border-color: #2b303a;
}

.daterangepicker .drp-selected {
    color: #aab0bb;
}

/* Календарь в однодата режиме */
.daterangepicker.single .calendar-table {
    background: #1b1f27;
}

/* Hover на датах */
.daterangepicker td.available:hover,
.daterangepicker th.available:hover {
    background: #2a1f4a;
    color: #fff;
}

/* Текст "Выбрать дату" и т.д. */
.daterangepicker .calendar-time {
    color: #e4e6eb;
    border-top-color: #2b303a;
}

.daterangepicker .calendar-time select {
    background: #1b1f27;
    border-color: #2b303a;
    color: #e4e6eb;
}

/* ===== SELECT DARK THEME (только для кастомных полей) ===== */

/* Стили ТОЛЬКО для твоих селектов */
.field .custom-select,
select[data-ftype="select"] {
    background-color: #1b1f27 !important;
    border: 1px solid #2b303a !important;
    color: #e4e6eb !important;
    border-radius: 8px;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23aab0bb' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 14px;
    padding-right: 2rem;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.field .custom-select:focus,
select[data-ftype="select"]:focus {
    border-color: #6403FF !important;
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(100, 3, 255, 0.25);
}

.field .custom-select option,
select[data-ftype="select"] option {
    background-color: #1b1f27 !important;
    color: #e4e6eb !important;
}

.field .custom-select option:checked,
select[data-ftype="select"] option:checked {
    background-color: #6403FF !important;
    color: #fff !important;
}

/* ===== DATATABLE SELECT (возвращаем стандарт) ===== */

.dataTables_wrapper .dataTables_length select.custom-select {
    background-color: #1b1f27;
    border: 1px solid #2b303a;
    color: #e4e6eb;
    border-radius: 8px;
    padding: 0.375rem 1.75rem 0.375rem 0.75rem;
    width: auto;
    display: inline-block;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23aab0bb' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 12px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    height: auto;
    line-height: normal;
}

/* Возвращаем нормальное отображение текста "Показать 50 записей" */
.dataTables_wrapper .dataTables_length {
    white-space: nowrap;
}

.dataTables_wrapper .dataTables_length label {
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dataTables_wrapper .dataTables_length select {
    width: auto;
    margin: 0 4px;
}