.ck-editor__editable,
textarea {
    min-height: 150px;
}

.datatable {
    width: 100% !important;
}

table.dataTable tbody td.select-checkbox::before,
table.dataTable tbody td.select-checkbox::after,
table.dataTable tbody th.select-checkbox::before,
table.dataTable tbody th.select-checkbox::after {
    top: 50%;
}

.dataTables_length,
.dataTables_filter,
.dt-buttons {
    margin-bottom: 0.333em;
    margin-top: .2rem;
}

.dataTables_filter {
    margin-right: .2rem;
}

.dt-buttons .btn {
    margin-left: 0.333em;
    border-radius: 0;
}

.table.datatable {
    box-sizing: border-box;
    border-collapse: collapse;
}

table.dataTable thead th {
    border-bottom: 2px solid #c8ced3;
}

.dataTables_wrapper.no-footer .dataTables_scrollBody {
    border-bottom: 1px solid #c8ced3;
}

.select2 {
    max-width: 100%;
    width: 100% !important;
}

.select2-selection__rendered {
    padding-bottom: 5px !important;
}

.has-error .invalid-feedback {
    display: block !important;
}

.btn-info,
.badge-info {
    color: white;
}

table.dataTable thead .sorting,
table.dataTable thead .sorting_asc,
table.dataTable thead .sorting_desc {
    background-image: none;
}

.sidebar .nav-item {
    cursor: pointer;
}

.btn-default {
    color: #23282c;
    background-color: #f0f3f5;
    border-color: #f0f3f5;
}

.btn-default.focus,
.btn-default:focus {
    box-shadow: 0 0 0 .2rem rgba(209, 213, 215, .5);
}

.btn-default:hover {
    color: #23282c;
    background-color: #d9e1e6;
    border-color: #d1dbe1;
}

.btn-group-xs > .btn,
.btn-xs {
    padding: 1px 5px;
    font-size: 12px;
    line-height: 1.5;
    border-radius: 3px;
}

.searchable-title {
    font-weight: bold;
}

.searchable-fields {
    color: #6c757d;
}

.searchable-link {
    color: #007bff;
}

.searchable-link:hover   {
    color: #0056b3;
}

.select2-results__option {
    padding: 6px 12px;
}

.form-group .required::after {
    content: " *";
    color: red;
}

.form-check.is-invalid ~ .invalid-feedback {
    display: block !important;
}

.c-sidebar-brand .c-sidebar-brand-full:hover {
    text-decoration: none;
}

.custom-select.form-control-sm {
    height: calc(1.5em + 0.5rem + 2px);
}

/* Додаткові стилі для покращення вигляду */
.card {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    border: 1px solid rgba(0, 0, 0, 0.125);
    border-radius: 0.375rem;
}

.card-header {
    background-color: rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    padding: 0.75rem 1.25rem;
}

.table-dark {
    background-color: #343a40;
    color: white;
}

.table-dark th {
    border-color: #454d55;
}

.badge {
    font-size: 0.75em;
    font-weight: 500;
    padding: 0.35em 0.65em;
}

.btn-group .btn {
    border-radius: 0;
}

.btn-group .btn:first-child {
    border-top-left-radius: 0.375rem;
    border-bottom-left-radius: 0.375rem;
}

.btn-group .btn:last-child {
    border-top-right-radius: 0.375rem;
    border-bottom-right-radius: 0.375rem;
}

/* Стилі для статистичних карток */
.bg-primary {
    background-color: #007bff !important;
}

.bg-success {
    background-color: #28a745 !important;
}

.bg-info {
    background-color: #17a2b8 !important;
}

.bg-warning {
    background-color: #ffc107 !important;
}

.bg-secondary {
    background-color: #6c757d !important;
}

.bg-danger {
    background-color: #dc3545 !important;
}

/* Стилі для іконок */
.fa-2x {
    font-size: 2em;
}

/* Стилі для карти */
#plants-map {
    border-radius: 0.375rem;
    overflow: hidden;
}

/* Стилі для таблиці */
.table-responsive {
    border-radius: 0.375rem;
}

.table th {
    font-weight: 600;
    vertical-align: middle;
}

.table td {
    vertical-align: middle;
}

/* Стилі для посилань в таблиці */
.table a {
    text-decoration: none;
}

.table a:hover {
    text-decoration: underline;
}

/* Стилі для чекбоксів */
.select-all, .select-item {
    cursor: pointer;
}

/* Стилі для DataTables */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_processing,
.dataTables_wrapper .dataTables_paginate {
    margin: 0.5rem 0;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: 0.375rem;
    margin: 0 0.125rem;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: #007bff;
    border-color: #007bff;
    color: white !important;
}

/* Стилі для popup на карті */
.leaflet-popup-content {
    margin: 0.5rem;
}

.leaflet-popup-content h6 {
    margin-bottom: 0.5rem;
    color: #007bff;
}

.leaflet-popup-content p {
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
}

.leaflet-popup-content .btn {
    margin-top: 0.5rem;
}

/* Анімації для карток */
.card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Стилі для мобільних пристроїв */
@media (max-width: 768px) {
    .card-body {
        padding: 1rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .btn-group .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.875rem;
    }
    
    .fa-2x {
        font-size: 1.5em;
    }
}

/* Стилі для графіків */
canvas {
    border-radius: 0.375rem;
}

/* Стилі для цін */
.price-high {
    color: #dc3545;
    font-weight: bold;
}

.price-medium {
    color: #ffc107;
    font-weight: bold;
}

.price-low {
    color: #28a745;
    font-weight: bold;
}

/* Стилі для статусів цін */
.badge.bg-success {
    background-color: #28a745 !important;
}

.badge.bg-warning {
    background-color: #ffc107 !important;
    color: #212529 !important;
}

.badge.bg-danger {
    background-color: #dc3545 !important;
}

/* Стилі для іконок в таблиці */
.table .fas {
    width: 16px;
    text-align: center;
}

/* Стилі для описів */
.text-muted {
    font-style: italic;
}

/* Стилі для кнопок дій */
.btn-group .btn {
    border-radius: 0;
}

.btn-group .btn:first-child {
    border-top-left-radius: 0.375rem;
    border-bottom-left-radius: 0.375rem;
}

.btn-group .btn:last-child {
    border-top-right-radius: 0.375rem;
    border-bottom-right-radius: 0.375rem;
}

/* Стилі для заголовків карток */
.card-header h5 {
    color: #495057;
    font-weight: 600;
}

/* Стилі для статистичних чисел */
.card h4 {
    font-weight: 700;
    font-size: 1.75rem;
}

.card p {
    font-size: 0.875rem;
    opacity: 0.9;
}

/* Стилі для графіка */
#prices-chart {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
}

/* Стилі для таблиці з темною шапкою */
.table-dark th {
    background-color: #343a40;
    border-color: #454d55;
    color: white;
    font-weight: 600;
}

/* Стилі для рядків таблиці */
.table tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.05);
}

/* Стилі для бейджів */
.badge {
    font-size: 0.75em;
    font-weight: 500;
    padding: 0.35em 0.65em;
}

/* Стилі для іконок в статистиці */
.card .fa-2x {
    opacity: 0.8;
}

/* Стилі для адаптивності графіка */
@media (max-width: 768px) {
    #prices-chart {
        height: 250px !important;
    }
    
    .card h4 {
        font-size: 1.5rem;
    }
    
    .card .fa-2x {
        font-size: 1.5em;
    }
}

/* Адмінка CoreUI: пункти бокового меню — медовий акцент (не синій primary Bootstrap) */
.c-sidebar .c-sidebar-nav-link,
.c-sidebar .c-sidebar-nav-dropdown-toggle {
    color: rgba(244, 196, 48, 0.92) !important;
}

.c-sidebar .c-sidebar-nav-link .c-sidebar-nav-icon,
.c-sidebar .c-sidebar-nav-dropdown-toggle .c-sidebar-nav-icon {
    color: rgba(244, 196, 48, 0.88) !important;
}

.c-sidebar .c-sidebar-nav-link:hover,
.c-sidebar .c-sidebar-nav-dropdown-toggle:hover {
    color: #ffeb7a !important;
    background: rgba(244, 196, 48, 0.12) !important;
}

.c-sidebar .c-sidebar-nav-link:hover .c-sidebar-nav-icon,
.c-sidebar .c-sidebar-nav-dropdown-toggle:hover .c-sidebar-nav-icon {
    color: #ffeb7a !important;
}

.c-sidebar .c-sidebar-nav-link.c-active,
.c-sidebar .c-active.c-sidebar-nav-dropdown-toggle {
    color: #fff6b0 !important;
    background: rgba(244, 196, 48, 0.22) !important;
}

.c-sidebar .c-sidebar-nav-link.c-active .c-sidebar-nav-icon,
.c-sidebar .c-active.c-sidebar-nav-dropdown-toggle .c-sidebar-nav-icon {
    color: #ffeb7a !important;
}

.c-sidebar .c-sidebar-nav-dropdown.c-show > .c-sidebar-nav-dropdown-toggle {
    color: #ffeb7a !important;
}
