/* ==============================================================
   Глобальні фікси адмінки (admin_global.css)
   ============================================================== */

/* 🔥 ФІКС ТЕМИ: Назавжди і жорстко ховаємо кнопку System */
button[x-on\:click*="'system'"],
button[x-on\:click*='"system"'] {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    pointer-events: none !important;
}

/* 🔥 ФІКС 1: Кнопка Оновити Логи */
#global-refresh-btn {
    background-color: #ffffff;
    color: #374151;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-weight: 500;
    font-size: 14px;
    padding: 8px 16px;
    display: inline-flex;
    align-items: center;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: all 0.2s;
}
#global-refresh-btn:hover { background-color: #f9fafb; }
html.dark #global-refresh-btn { background-color: #1f2937 !important; color: #f3f4f6 !important; border-color: #374151 !important; }
html.dark #global-refresh-btn:hover { background-color: #374151 !important; }

/* 🔥 ФІКС 2: Чорний текст для опцій у випадаючому списку "Action" */
select[name="action"],
select[name="action"] option,
.actions select option,
div[x-show*="selected.length"] select option {
    color: #111827 !important;
    background-color: #ffffff !important;
}

/* 🔥 ФІКС 3: Кнопка "Виконати" (Go) для масових дій.
   КРИТИЧНО: додано :not(.btn-tw) щоб НЕ перебивати зелені кнопки Submit
   у формах tools_dashboard! */
#changelist-form button[name="index"],
#changelist-form .actions button[type="submit"]:not(.btn-tw),
div[x-show*="selected.length"] button[type="submit"]:not(.btn-tw) {
    display: inline-flex !important;
    visibility: visible !important;
    background-color: #111827 !important;
    color: #ffffff !important;
    font-weight: bold !important;
    padding: 6px 16px !important;
    border-radius: 6px !important;
    margin-left: 12px !important;
    border: 1px solid rgba(255,255,255,0.2) !important;
    cursor: pointer !important;
    text-transform: uppercase;
    font-size: 12px;
}
#changelist-form button[name="index"]:hover,
#changelist-form .actions button[type="submit"]:not(.btn-tw):hover,
div[x-show*="selected.length"] button[type="submit"]:not(.btn-tw):hover {
    background-color: #374151 !important;
}
html.dark #changelist-form button[name="index"],
html.dark #changelist-form .actions button[type="submit"]:not(.btn-tw),
html.dark div[x-show*="selected.length"] button[type="submit"]:not(.btn-tw) {
    background-color: #1f2937 !important;
    color: #ffffff !important;
    border: 1px solid #4b5563 !important;
}

/* ============================================================== */

.log-details-container { color: #111827 !important; }
.log-details-container span, .log-details-container b, .log-details-container i { color: inherit; }
html.dark .log-details-container { color: #f3f4f6 !important; }

html.dark .select2-container--default .select2-selection--single,
html.dark .select2-container--default .select2-selection--multiple { background-color: #111827 !important; border-color: #374151 !important; color: #f3f4f6 !important; }
html.dark .select2-container--default .select2-selection__rendered { color: #f3f4f6 !important; }
html.dark .select2-dropdown { background-color: #1f2937 !important; border-color: #374151 !important; }
html.dark .select2-search__field { background-color: #111827 !important; color: #f3f4f6 !important; border: 1px solid #4b5563 !important; }
html.dark .select2-results__option { color: #d1d5db !important; background-color: #1f2937 !important; }
html.dark .select2-results__option[aria-selected="true"] { background-color: #374151 !important; color: #ffffff !important; }
html.dark .select2-results__option--highlighted[aria-selected] { background-color: #10b981 !important; color: #ffffff !important; }
html.dark .select2-container--default .select2-selection--single .select2-selection__arrow b { border-color: #9ca3af transparent transparent transparent !important; }