﻿/* UCB brand theme — primary #e21c23, text black (light) / white (dark) */
:root {
    --ucb-red: #e21c23;
    --ucb-red-strong: #c4171e;
    --ucb-red-soft: #fde8e9;
    --ucb-black: #000000;
    --ucb-muted: #4b5563;
    --ucb-line: #e5e7eb;
    --ucb-radius: 14px;
    --ucb-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.06);
    --ucb-text: #000000;
    --ucb-text-muted: #4b5563;

    --primary: #e21c23;
    --primary-rgb: 226, 28, 35;
    --body-color: #000000;
    --info: #e21c23;
    --info-rgb: 226, 28, 35;
}

html[data-color-theme="dark"],
[data-color-theme="dark"] {
    --ucb-text: #ffffff;
    --ucb-text-muted: rgba(255, 255, 255, 0.72);
    --ucb-black: #ffffff;
    --ucb-muted: rgba(255, 255, 255, 0.72);
    --ucb-line: rgba(255, 255, 255, 0.12);
    --ucb-red-soft: rgba(226, 28, 35, 0.18);
    --ucb-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 8px 24px rgba(0, 0, 0, 0.28);
    --body-color: #ffffff;
}

body {
    color: var(--ucb-text);
}

/* Buttons */
.btn-primary {
    --btn-bg: var(--ucb-red);
    --btn-border-color: var(--ucb-red);
    --btn-hover-bg: var(--ucb-red-strong);
    --btn-hover-border-color: var(--ucb-red-strong);
    --btn-active-bg: var(--ucb-red-strong);
    --btn-active-border-color: var(--ucb-red-strong);
    --btn-disabled-bg: var(--ucb-red);
    --btn-disabled-border-color: var(--ucb-red);
    background-color: var(--ucb-red) !important;
    border-color: var(--ucb-red) !important;
    color: #fff !important;
    font-weight: 600;
    box-shadow: 0 6px 14px rgba(226, 28, 35, 0.22);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: var(--ucb-red-strong) !important;
    border-color: var(--ucb-red-strong) !important;
    color: #fff !important;
}

.btn-outline-primary {
    --btn-color: var(--ucb-red);
    --btn-border-color: var(--ucb-red);
    --btn-hover-bg: var(--ucb-red);
    --btn-hover-border-color: var(--ucb-red);
    --btn-hover-color: #fff;
    color: var(--ucb-red) !important;
    border-color: var(--ucb-red) !important;
    background: #fff !important;
    font-weight: 600;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
    background: var(--ucb-red) !important;
    border-color: var(--ucb-red) !important;
    color: #fff !important;
}

.btn-info {
    background-color: var(--ucb-red) !important;
    border-color: var(--ucb-red) !important;
    color: #fff !important;
    font-weight: 600;
    box-shadow: 0 6px 14px rgba(226, 28, 35, 0.18);
}

.btn-info:hover,
.btn-info:focus,
.btn-info:active {
    background-color: var(--ucb-red-strong) !important;
    border-color: var(--ucb-red-strong) !important;
    color: #fff !important;
}

.btn-soft-ucb {
    background: var(--ucb-red-soft) !important;
    border: 1px solid rgba(226, 28, 35, 0.18) !important;
    color: var(--ucb-red-strong) !important;
    font-weight: 600;
}

.btn-soft-ucb:hover {
    background: #fbd0d2 !important;
    color: var(--ucb-red-strong) !important;
}

/* Links / accents */
.text-primary,
.link-primary {
    color: var(--ucb-red) !important;
}

.bg-primary {
    background-color: var(--ucb-red) !important;
}

.border-primary {
    border-color: var(--ucb-red) !important;
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(226, 28, 35, 0.45) !important;
    box-shadow: 0 0 0 0.2rem rgba(226, 28, 35, 0.15) !important;
}

/* Checkboxes / radios â€” UCB red */
.form-check-input {
    border-color: #d1d5db;
    cursor: pointer;
    accent-color: var(--ucb-red);
}

.form-check-input:checked {
    background-color: var(--ucb-red) !important;
    border-color: var(--ucb-red) !important;
}

.form-check-input:focus {
    border-color: rgba(226, 28, 35, 0.55) !important;
    box-shadow: 0 0 0 0.2rem rgba(226, 28, 35, 0.18) !important;
}

.form-check-input:checked[type=checkbox] {
    --form-check-bg-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");
}

.form-check-label {
    color: var(--ucb-text);
    cursor: pointer;
}

/* Content cards */
.content > .card,
.ucb-card {
    border: 1px solid var(--ucb-line) !important;
    border-radius: var(--ucb-radius) !important;
    box-shadow: var(--ucb-shadow) !important;
    overflow: hidden;
    color: var(--ucb-text);
}

.content > .card > .card-header,
.ucb-card > .card-header {
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
    border-bottom: 1px solid var(--ucb-line);
    padding: 1rem 1.25rem;
}

.content > .card .card-title,
.ucb-card .card-title {
    color: var(--ucb-text);
    font-weight: 700;
    letter-spacing: -0.01em;
}

/* Filter / list polish */
.ucb-filter-card .form-label {
    color: var(--ucb-text);
    font-weight: 600;
    font-size: 0.82rem;
}

.ucb-table thead th {
    color: var(--ucb-text);
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom-width: 1px !important;
    background: #fafafa;
    padding-top: 0.85rem;
    padding-bottom: 0.85rem;
}

.ucb-table tbody td {
    color: var(--ucb-text);
    vertical-align: middle;
    padding-top: 0.95rem;
    padding-bottom: 0.95rem;
    border-color: #f1f5f9;
}

.ucb-table tbody tr {
    transition: background 0.15s ease;
}

.ucb-table tbody tr:hover {
    background: #fff8f8;
}

.ucb-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    padding: 0.28rem 0.65rem;
    border-radius: 999px;
    background: var(--ucb-red-soft);
    color: var(--ucb-red-strong);
    font-weight: 700;
    font-size: 0.8rem;
}

.ucb-action-btn {
    width: 2.1rem;
    height: 2.1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid var(--ucb-line);
    background: #fff;
    color: var(--ucb-black) !important;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.ucb-action-btn:hover {
    background: var(--ucb-red-soft);
    border-color: #f5a3a6;
    color: var(--ucb-red) !important;
    box-shadow: 0 4px 10px rgba(226, 28, 35, 0.12);
}

.ucb-action-btn i {
    color: inherit !important;
}

html[data-color-theme="dark"] .ucb-action-btn,
[data-color-theme="dark"] .ucb-action-btn {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.14) !important;
    color: rgba(255, 255, 255, 0.9) !important;
    box-shadow: none;
}

html[data-color-theme="dark"] .ucb-action-btn:hover,
[data-color-theme="dark"] .ucb-action-btn:hover {
    background: rgba(226, 28, 35, 0.28) !important;
    border-color: rgba(226, 28, 35, 0.45) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(226, 28, 35, 0.2);
}

.dropdown-menu {
    border: 1px solid var(--ucb-line);
    border-radius: 12px;
    box-shadow: var(--ucb-shadow);
    padding: 0.4rem;
}

.dropdown-item {
    border-radius: 8px;
    color: var(--ucb-black) !important;
    font-weight: 500;
    padding: 0.55rem 0.75rem;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: var(--ucb-red-soft) !important;
    color: var(--ucb-black) !important;
}

.dropdown-item i {
    color: var(--ucb-red);
}

.page-item.active .page-link {
    background-color: var(--ucb-red) !important;
    border-color: var(--ucb-red) !important;
}

.page-link {
    color: var(--ucb-text);
}

.page-link:hover {
    color: var(--ucb-red);
}

.breadcrumb-item.active {
    color: var(--ucb-text);
}

.breadcrumb-item a {
    color: var(--ucb-muted);
}

.breadcrumb-item a:hover {
    color: var(--ucb-red);
}

/* Form labels */
.form-label {
    color: var(--ucb-text);
    font-weight: 600;
}

/* Select2 â€” UCB focus */
.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--focus .select2-selection--multiple,
.select2-container--default.select2-container--open .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--multiple {
    border-color: rgba(226, 28, 35, 0.5) !important;
    box-shadow: 0 0 0 0.2rem rgba(226, 28, 35, 0.12) !important;
}

.select2-container--default .select2-results__option--highlighted[aria-selected],
.select2-container--default .select2-results__option--highlighted[data-selected] {
    background-color: var(--ucb-red) !important;
    color: #fff !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: var(--ucb-red-soft) !important;
    border-color: rgba(226, 28, 35, 0.2) !important;
    color: var(--ucb-black) !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: var(--ucb-red) !important;
}

/* =========================================================
   Dark navbar + footer (UCB) — Limitless fixed-top safe
   Do NOT set position:relative or overflow:hidden on nav
   (overflow clips the profile dropdown).
   ========================================================= */
:root {
    --ucb-shell-bg: #252b36;
    --ucb-shell-bg-2: #1e2430;
    --ucb-shell-nav-height: 3.375rem;
}

.ucb-shell-nav,
.ucb-shell-footer {
    color: #fff !important;
    border: 0 !important;
    margin: 0 !important;
    background:
        radial-gradient(ellipse 80% 120% at 50% -50%, rgba(226, 28, 35, 0.18), transparent 55%),
        linear-gradient(180deg, var(--ucb-shell-bg) 0%, var(--ucb-shell-bg-2) 100%) !important;
    box-shadow: 0 1px 0 rgba(226, 28, 35, 0.55);
}

.ucb-shell-nav.fixed-top {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    left: 0 !important;
    z-index: 1030 !important;
}

.ucb-shell-footer {
    position: relative;
    margin-top: auto;
    min-height: 2.75rem;
}

.ucb-shell-nav::after,
.ucb-shell-footer::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 5%, rgba(226, 28, 35, 0.95) 50%, transparent 95%);
    pointer-events: none;
}

.ucb-shell-nav::after {
    bottom: 0;
}

.ucb-shell-footer::before {
    top: 0;
}

.ucb-shell-nav > .container-fluid,
.ucb-shell-footer > .container-fluid {
    position: relative;
    z-index: 1;
    min-height: var(--ucb-shell-nav-height);
    align-items: center;
}

.ucb-shell-footer > .ucb-shell-footer__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
    min-height: 2.75rem;
}

.ucb-shell-footer__left,
.ucb-shell-footer__right {
    flex: 1 1 0;
    min-width: 0;
}

.ucb-shell-footer__right {
    display: flex;
    justify-content: flex-end;
    margin: 0;
}

.ucb-shell-footer__center {
    flex: 0 1 auto;
    text-align: center;
    color: rgba(255, 255, 255, 0.92) !important;
    font-size: 0.8125rem;
    font-weight: 500;
    white-space: nowrap;
}

@media (max-width: 767.98px) {
    .ucb-shell-footer > .ucb-shell-footer__row {
        flex-wrap: wrap;
        justify-content: center;
        padding-top: 0.35rem;
        padding-bottom: 0.35rem;
    }

    .ucb-shell-footer__left,
    .ucb-shell-footer__right {
        flex: 1 1 auto;
    }

    .ucb-shell-footer__center {
        order: 3;
        flex: 1 1 100%;
        white-space: normal;
        font-size: 0.75rem;
    }
}

.ucb-shell-nav .navbar-nav-link,
.ucb-shell-nav .navbar-toggler,
.ucb-shell-footer .navbar-nav-link,
.ucb-shell-footer span,
.ucb-shell-footer a {
    color: rgba(255, 255, 255, 0.92) !important;
}

.ucb-shell-nav .navbar-nav-link:hover,
.ucb-shell-nav .navbar-nav-link:focus,
.ucb-shell-nav .navbar-nav-link.show,
.ucb-shell-footer a:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.08) !important;
}

.ucb-shell-nav .nav-item-dropdown-lg > .navbar-nav-link {
    background: rgba(255, 255, 255, 0.06);
}

.ucb-shell-nav .nav-item-dropdown-lg > .navbar-nav-link:hover,
.ucb-shell-nav .nav-item-dropdown-lg > .navbar-nav-link.show {
    background: rgba(255, 255, 255, 0.1) !important;
}

.ucb-shell-nav .status-indicator-container img {
    border: 1.5px solid rgba(226, 28, 35, 0.55);
    object-fit: cover;
    background: #1a1d26;
}

.ucb-shell-nav .navbar-search {
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

.ucb-shell-nav .navbar-search .form-control,
.ucb-shell-nav .navbar-search input[type="search"],
.ucb-shell-nav .navbar-search input[type="text"],
.ucb-shell-nav #search-input,
.ucb-shell-nav .ucb-nav-search {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(226, 28, 35, 0.28) !important;
    color: #fff !important;
    border-radius: 999px !important;
    min-height: 2.35rem;
}

.ucb-shell-nav .navbar-search .form-control::placeholder,
.ucb-shell-nav .navbar-search input::placeholder,
.ucb-shell-nav #search-input::placeholder {
    color: rgba(255, 255, 255, 0.42) !important;
}

.ucb-shell-nav .navbar-search .form-control:focus,
.ucb-shell-nav .navbar-search input:focus,
.ucb-shell-nav #search-input:focus {
    border-color: rgba(226, 28, 35, 0.75) !important;
    box-shadow: 0 0 0 0.2rem rgba(226, 28, 35, 0.16) !important;
    background: rgba(255, 255, 255, 0.08) !important;
    outline: none !important;
}

.ucb-shell-nav .navbar-search .form-control-feedback-icon,
.ucb-shell-nav .navbar-search .ph-magnifying-glass {
    color: rgba(255, 255, 255, 0.45) !important;
}

/* Profile dropdown — match reference (light) */
.ucb-shell-nav .dropdown-menu {
    background: #fff !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important;
    padding: 0.4rem !important;
    margin-top: 0.35rem !important;
}

.ucb-shell-nav .dropdown-item {
    color: #111 !important;
    font-weight: 500;
    border-radius: 8px;
}

.ucb-shell-nav .dropdown-item i {
    color: #e21c23 !important;
}

.ucb-shell-nav .dropdown-item:hover,
.ucb-shell-nav .dropdown-item:focus {
    background: rgba(226, 28, 35, 0.08) !important;
    color: #111 !important;
}

.ucb-shell-nav .dropdown-divider {
    border-top-color: rgba(0, 0, 0, 0.08);
    margin: 0.35rem 0;
}

/* Profile dropdown — dark theme (readable white text on dark panel) */
html[data-color-theme="dark"] .ucb-shell-nav .dropdown-menu,
[data-color-theme="dark"] .ucb-shell-nav .dropdown-menu {
    background: #1a1f29 !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45) !important;
}

html[data-color-theme="dark"] .ucb-shell-nav .dropdown-item,
[data-color-theme="dark"] .ucb-shell-nav .dropdown-item {
    color: #ffffff !important;
}

html[data-color-theme="dark"] .ucb-shell-nav .dropdown-item i,
[data-color-theme="dark"] .ucb-shell-nav .dropdown-item i {
    color: #e21c23 !important;
}

html[data-color-theme="dark"] .ucb-shell-nav .dropdown-item:hover,
html[data-color-theme="dark"] .ucb-shell-nav .dropdown-item:focus,
[data-color-theme="dark"] .ucb-shell-nav .dropdown-item:hover,
[data-color-theme="dark"] .ucb-shell-nav .dropdown-item:focus {
    background: rgba(226, 28, 35, 0.18) !important;
    color: #ffffff !important;
}

html[data-color-theme="dark"] .ucb-shell-nav .dropdown-divider,
[data-color-theme="dark"] .ucb-shell-nav .dropdown-divider {
    border-top-color: rgba(255, 255, 255, 0.12);
}

/* =========================================================
   SweetAlert2 — UCB modern confirmation theme
   ========================================================= */
.swal2-popup {
    border-radius: 20px !important;
    padding: 1.75rem 1.5rem 1.5rem !important;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18) !important;
}

.swal2-title {
    color: #000 !important;
    font-weight: 700 !important;
    font-size: 1.35rem !important;
    letter-spacing: -0.02em !important;
}

.swal2-html-container {
    color: #374151 !important;
    font-size: 0.95rem !important;
}

.swal2-icon.swal2-warning,
.swal2-icon.swal2-question {
    border-color: #e21c23 !important;
    color: #e21c23 !important;
}

.swal2-icon.swal2-warning .swal2-icon-content,
.swal2-icon.swal2-question .swal2-icon-content {
    color: #e21c23 !important;
}

.swal2-actions {
    gap: 0.65rem !important;
    margin-top: 1.35rem !important;
}

.swal2-styled.swal2-confirm,
.swal2-styled.swal2-cancel,
.swal2-styled.swal2-deny,
.swal2-actions .swal2-confirm,
.swal2-actions .swal2-cancel,
.swal2-actions .swal2-deny,
.swal2-actions .btn {
    border-radius: 999px !important;
    min-height: 2.65rem !important;
    min-width: 7.5rem !important;
    padding: 0.65rem 1.5rem !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.01em !important;
    border-width: 1.5px !important;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, filter 0.18s ease !important;
}

.swal2-styled.swal2-confirm,
.swal2-actions .swal2-confirm,
.swal2-actions .btn-primary,
.swal2-actions .btn-danger,
.swal2-actions .btn-success {
    background: linear-gradient(135deg, #e21c23 0%, #c4171e 100%) !important;
    border-color: transparent !important;
    color: #fff !important;
    box-shadow: 0 8px 20px rgba(226, 28, 35, 0.32) !important;
}

.swal2-styled.swal2-confirm:hover,
.swal2-actions .swal2-confirm:hover,
.swal2-actions .btn-primary:hover,
.swal2-actions .btn-danger:hover,
.swal2-actions .btn-success:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
    box-shadow: 0 12px 26px rgba(226, 28, 35, 0.4) !important;
    background: linear-gradient(135deg, #e92a31 0%, #e21c23 100%) !important;
    color: #fff !important;
}

.swal2-styled.swal2-confirm:focus,
.swal2-actions .swal2-confirm:focus,
.swal2-actions .btn-primary:focus,
.swal2-actions .btn-danger:focus,
.swal2-actions .btn-success:focus {
    box-shadow: 0 0 0 0.22rem rgba(226, 28, 35, 0.22), 0 8px 20px rgba(226, 28, 35, 0.28) !important;
}

.swal2-styled.swal2-cancel,
.swal2-actions .swal2-cancel,
.swal2-actions .btn-secondary,
.swal2-actions .btn-dark {
    background: #fff !important;
    border-color: #d1d5db !important;
    color: #111 !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
}

.swal2-styled.swal2-cancel:hover,
.swal2-actions .swal2-cancel:hover,
.swal2-actions .btn-secondary:hover,
.swal2-actions .btn-dark:hover {
    background: #f9fafb !important;
    border-color: #9ca3af !important;
    color: #000 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
}

.swal2-styled.swal2-cancel:focus,
.swal2-actions .swal2-cancel:focus {
    box-shadow: 0 0 0 0.22rem rgba(17, 17, 17, 0.12) !important;
}

/* SweetAlert2 — dark mode (readable white text on all swals) */
html[data-color-theme="dark"] .swal2-popup,
[data-color-theme="dark"] .swal2-popup {
    background: linear-gradient(165deg, #252b36 0%, #1a1f29 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5) !important;
}

html[data-color-theme="dark"] .swal2-title,
[data-color-theme="dark"] .swal2-title {
    color: #ffffff !important;
}

html[data-color-theme="dark"] .swal2-html-container,
html[data-color-theme="dark"] .swal2-content,
html[data-color-theme="dark"] .swal2-html-container *,
[data-color-theme="dark"] .swal2-html-container,
[data-color-theme="dark"] .swal2-content {
    color: rgba(255, 255, 255, 0.78) !important;
}

html[data-color-theme="dark"] .swal2-footer,
[data-color-theme="dark"] .swal2-footer {
    border-top-color: rgba(255, 255, 255, 0.12) !important;
    color: rgba(255, 255, 255, 0.65) !important;
}

html[data-color-theme="dark"] .swal2-close,
[data-color-theme="dark"] .swal2-close {
    color: rgba(255, 255, 255, 0.55) !important;
}

html[data-color-theme="dark"] .swal2-close:hover,
[data-color-theme="dark"] .swal2-close:hover {
    color: #ffffff !important;
}

html[data-color-theme="dark"] .swal2-input,
html[data-color-theme="dark"] .swal2-textarea,
html[data-color-theme="dark"] .swal2-select,
[data-color-theme="dark"] .swal2-input,
[data-color-theme="dark"] .swal2-textarea,
[data-color-theme="dark"] .swal2-select {
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    color: #ffffff !important;
}

html[data-color-theme="dark"] .swal2-input::placeholder,
html[data-color-theme="dark"] .swal2-textarea::placeholder,
[data-color-theme="dark"] .swal2-input::placeholder,
[data-color-theme="dark"] .swal2-textarea::placeholder {
    color: rgba(255, 255, 255, 0.4) !important;
}

html[data-color-theme="dark"] .swal2-validation-message,
[data-color-theme="dark"] .swal2-validation-message {
    background: rgba(226, 28, 35, 0.15) !important;
    color: #ffffff !important;
}

html[data-color-theme="dark"] .swal2-styled.swal2-cancel,
html[data-color-theme="dark"] .swal2-actions .swal2-cancel,
html[data-color-theme="dark"] .swal2-actions .btn-secondary,
html[data-color-theme="dark"] .swal2-actions .btn-dark,
[data-color-theme="dark"] .swal2-styled.swal2-cancel,
[data-color-theme="dark"] .swal2-actions .swal2-cancel,
[data-color-theme="dark"] .swal2-actions .btn-secondary,
[data-color-theme="dark"] .swal2-actions .btn-dark {
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: rgba(255, 255, 255, 0.22) !important;
    color: #ffffff !important;
    box-shadow: none !important;
}

html[data-color-theme="dark"] .swal2-styled.swal2-cancel:hover,
html[data-color-theme="dark"] .swal2-actions .swal2-cancel:hover,
html[data-color-theme="dark"] .swal2-actions .btn-secondary:hover,
html[data-color-theme="dark"] .swal2-actions .btn-dark:hover,
[data-color-theme="dark"] .swal2-styled.swal2-cancel:hover,
[data-color-theme="dark"] .swal2-actions .swal2-cancel:hover,
[data-color-theme="dark"] .swal2-actions .btn-secondary:hover,
[data-color-theme="dark"] .swal2-actions .btn-dark:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: rgba(255, 255, 255, 0.35) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25) !important;
}

html[data-color-theme="dark"] .swal2-styled.swal2-cancel:focus,
html[data-color-theme="dark"] .swal2-actions .swal2-cancel:focus,
[data-color-theme="dark"] .swal2-styled.swal2-cancel:focus,
[data-color-theme="dark"] .swal2-actions .swal2-cancel:focus {
    box-shadow: 0 0 0 0.22rem rgba(255, 255, 255, 0.12) !important;
}

html[data-color-theme="dark"] .swal2-timer-progress-bar,
[data-color-theme="dark"] .swal2-timer-progress-bar {
    background: #e21c23 !important;
}

/* =========================================================
   Dark theme — form-level text white
   ========================================================= */
html[data-color-theme="dark"] .form-label,
html[data-color-theme="dark"] label.form-label,
html[data-color-theme="dark"] .form-check-label,
html[data-color-theme="dark"] .col-form-label,
html[data-color-theme="dark"] .card-title,
html[data-color-theme="dark"] .card-header,
html[data-color-theme="dark"] .card-header h1,
html[data-color-theme="dark"] .card-header h2,
html[data-color-theme="dark"] .card-header h3,
html[data-color-theme="dark"] .card-header h4,
html[data-color-theme="dark"] .card-header h5,
html[data-color-theme="dark"] .card-header h6,
html[data-color-theme="dark"] .card-body h1,
html[data-color-theme="dark"] .card-body h2,
html[data-color-theme="dark"] .card-body h3,
html[data-color-theme="dark"] .card-body h4,
html[data-color-theme="dark"] .card-body h5,
html[data-color-theme="dark"] .card-body h6,
html[data-color-theme="dark"] .content > .card .card-title,
html[data-color-theme="dark"] .ucb-card .card-title,
html[data-color-theme="dark"] .ucb-filter-card .form-label,
html[data-color-theme="dark"] .form-text,
html[data-color-theme="dark"] .input-group-text,
html[data-color-theme="dark"] legend,
html[data-color-theme="dark"] fieldset legend,
html[data-color-theme="dark"] .page-title,
html[data-color-theme="dark"] .content .card,
html[data-color-theme="dark"] .content .card .card-body,
[data-color-theme="dark"] .form-label,
[data-color-theme="dark"] label.form-label,
[data-color-theme="dark"] .form-check-label,
[data-color-theme="dark"] .col-form-label,
[data-color-theme="dark"] .card-title,
[data-color-theme="dark"] .card-header,
[data-color-theme="dark"] .card-body h5,
[data-color-theme="dark"] .card-body h6,
[data-color-theme="dark"] .content > .card .card-title,
[data-color-theme="dark"] .ucb-card .card-title,
[data-color-theme="dark"] .form-text,
[data-color-theme="dark"] legend {
    color: #ffffff !important;
}

html[data-color-theme="dark"] .text-muted,
html[data-color-theme="dark"] .form-text.text-muted,
html[data-color-theme="dark"] small.text-muted,
[data-color-theme="dark"] .text-muted,
[data-color-theme="dark"] .form-text.text-muted {
    color: rgba(255, 255, 255, 0.65) !important;
}

html[data-color-theme="dark"] .content > .card > .card-header,
html[data-color-theme="dark"] .ucb-card > .card-header,
[data-color-theme="dark"] .content > .card > .card-header,
[data-color-theme="dark"] .ucb-card > .card-header {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.02) 100%) !important;
    border-bottom-color: rgba(255, 255, 255, 0.1) !important;
}

html[data-color-theme="dark"] .ucb-table thead th,
[data-color-theme="dark"] .ucb-table thead th {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.04) !important;
}

html[data-color-theme="dark"] .ucb-table tbody td,
[data-color-theme="dark"] .ucb-table tbody td {
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

html[data-color-theme="dark"] .ucb-table tbody tr:hover,
[data-color-theme="dark"] .ucb-table tbody tr:hover {
    background: rgba(226, 28, 35, 0.08) !important;
}

html[data-color-theme="dark"] .btn-outline-primary,
[data-color-theme="dark"] .btn-outline-primary {
    background: transparent !important;
}

/* Dark theme dropdowns: dark panel + white text (never white-on-white) */
html[data-color-theme="dark"] .dropdown-menu,
[data-color-theme="dark"] .dropdown-menu {
    background-color: #1a1f29 !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
}

html[data-color-theme="dark"] .dropdown-item,
[data-color-theme="dark"] .dropdown-item {
    color: #ffffff !important;
}

html[data-color-theme="dark"] .dropdown-item:hover,
html[data-color-theme="dark"] .dropdown-item:focus,
[data-color-theme="dark"] .dropdown-item:hover,
[data-color-theme="dark"] .dropdown-item:focus {
    background: rgba(226, 28, 35, 0.18) !important;
    color: #ffffff !important;
}

html[data-color-theme="dark"] .dropdown-item i,
[data-color-theme="dark"] .dropdown-item i {
    color: #e21c23 !important;
}

html[data-color-theme="dark"] .dropdown-divider,
[data-color-theme="dark"] .dropdown-divider {
    border-top-color: rgba(255, 255, 255, 0.12) !important;
}

/* =========================================================
   Notifications offcanvas — dark atmospheric + modern buttons
   ========================================================= */
.ucb-notify-panel {
    border-left: 1px solid rgba(255, 255, 255, 0.08);
}

html[data-color-theme="dark"] .ucb-notify-panel,
[data-color-theme="dark"] .ucb-notify-panel {
    color: #fff;
    background:
        radial-gradient(ellipse 80% 50% at 100% -10%, rgba(226, 28, 35, 0.28), transparent 55%),
        radial-gradient(ellipse 60% 40% at 0% 100%, rgba(226, 28, 35, 0.12), transparent 50%),
        linear-gradient(180deg, #12151d 0%, #0d1016 55%, #151925 100%) !important;
    box-shadow: -12px 0 40px rgba(0, 0, 0, 0.45);
}

html[data-color-theme="dark"] .ucb-notify-panel::before,
[data-color-theme="dark"] .ucb-notify-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 36px 36px;
    opacity: 0.45;
    -webkit-mask-image: radial-gradient(ellipse at 70% 20%, #000 20%, transparent 75%);
    mask-image: radial-gradient(ellipse at 70% 20%, #000 20%, transparent 75%);
}

/* Keep Bootstrap offcanvas-end positioning intact */
html[data-color-theme="dark"] .ucb-notify-panel.offcanvas-end,
[data-color-theme="dark"] .ucb-notify-panel.offcanvas-end {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: auto !important;
    height: 100% !important;
    overflow-y: auto;
}

html[data-color-theme="dark"] .ucb-notify-panel::before,
[data-color-theme="dark"] .ucb-notify-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 36px 36px;
    opacity: 0.45;
    -webkit-mask-image: radial-gradient(ellipse at 70% 20%, #000 20%, transparent 75%);
    mask-image: radial-gradient(ellipse at 70% 20%, #000 20%, transparent 75%);
}

html[data-color-theme="dark"] .ucb-notify-panel > *,
[data-color-theme="dark"] .ucb-notify-panel > * {
    position: relative;
    z-index: 1;
}

html[data-color-theme="dark"] .ucb-notify-panel__header,
[data-color-theme="dark"] .ucb-notify-panel__header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    background: rgba(255, 255, 255, 0.03);
}

html[data-color-theme="dark"] .ucb-notify-panel__header .offcanvas-title,
[data-color-theme="dark"] .ucb-notify-panel__header .offcanvas-title {
    color: #fff !important;
    font-weight: 700;
    letter-spacing: -0.01em;
}

html[data-color-theme="dark"] .ucb-notify-panel__close,
[data-color-theme="dark"] .ucb-notify-panel__close {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
}

html[data-color-theme="dark"] .ucb-notify-panel__close:hover,
[data-color-theme="dark"] .ucb-notify-panel__close:hover {
    background: rgba(226, 28, 35, 0.25) !important;
    border-color: rgba(226, 28, 35, 0.45) !important;
    color: #fff !important;
}

html[data-color-theme="dark"] .ucb-notify-panel__subheader,
[data-color-theme="dark"] .ucb-notify-panel__subheader {
    background: rgba(255, 255, 255, 0.04) !important;
    color: rgba(255, 255, 255, 0.75) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

html[data-color-theme="dark"] .ucb-notify-panel__footer,
[data-color-theme="dark"] .ucb-notify-panel__footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
}

.ucb-notify-btn {
    border-radius: 999px !important;
    min-height: 2.55rem;
    font-weight: 650 !important;
    letter-spacing: 0.01em;
    border-width: 1.5px !important;
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease, background 0.18s ease !important;
}

.ucb-notify-btn--primary {
    background: linear-gradient(135deg, #e21c23 0%, #c4171e 100%) !important;
    border-color: transparent !important;
    color: #fff !important;
    box-shadow: 0 8px 20px rgba(226, 28, 35, 0.35) !important;
}

.ucb-notify-btn--primary:hover,
.ucb-notify-btn--primary:focus {
    transform: translateY(-1px);
    filter: brightness(1.05);
    color: #fff !important;
    box-shadow: 0 12px 26px rgba(226, 28, 35, 0.45) !important;
}

.ucb-notify-btn--ghost {
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: rgba(255, 255, 255, 0.18) !important;
    color: #fff !important;
    box-shadow: none !important;
}

.ucb-notify-btn--ghost:hover,
.ucb-notify-btn--ghost:focus {
    transform: translateY(-1px);
    background: rgba(226, 28, 35, 0.18) !important;
    border-color: rgba(226, 28, 35, 0.5) !important;
    color: #fff !important;
}

/* Light theme ghost button fallback */
html:not([data-color-theme="dark"]) .ucb-notify-btn--ghost {
    background: #111 !important;
    border-color: #111 !important;
    color: #fff !important;
}

html:not([data-color-theme="dark"]) .ucb-notify-btn--ghost:hover {
    background: #000 !important;
    border-color: #000 !important;
}

html[data-color-theme="dark"] .ucb-notify-item,
[data-color-theme="dark"] .ucb-notify-item {
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: #fff !important;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease;
}

html[data-color-theme="dark"] .ucb-notify-item:hover,
[data-color-theme="dark"] .ucb-notify-item:hover {
    background: rgba(226, 28, 35, 0.12) !important;
    border-color: rgba(226, 28, 35, 0.35);
    color: #fff !important;
}

html[data-color-theme="dark"] .ucb-notify-item__title,
[data-color-theme="dark"] .ucb-notify-item__title {
    color: #fff;
    font-weight: 600;
}

html[data-color-theme="dark"] .ucb-notify-item__body,
html[data-color-theme="dark"] .ucb-notify-item__time,
html[data-color-theme="dark"] .ucb-notify-empty,
[data-color-theme="dark"] .ucb-notify-item__body,
[data-color-theme="dark"] .ucb-notify-item__time,
[data-color-theme="dark"] .ucb-notify-empty {
    color: rgba(255, 255, 255, 0.65) !important;
}

.ucb-notify-item {
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    background: #f8fafc;
}

.ucb-notify-item:hover {
    background: #f1f5f9;
    color: inherit;
}

.ucb-notify-empty {
    color: #64748b;
}

/* =========================================================
   Global dark mode — atmospheric page + readable cards
   ========================================================= */
html[data-color-theme="dark"] .content > .card,
html[data-color-theme="dark"] .ucb-card,
html[data-color-theme="dark"] .card {
    background: linear-gradient(165deg, #252b36 0%, #1a1f29 100%) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.32) !important;
}

html[data-color-theme="dark"] .content > .card > .card-header,
html[data-color-theme="dark"] .ucb-card > .card-header,
html[data-color-theme="dark"] .card > .card-header {
    background: rgba(255, 255, 255, 0.03) !important;
    border-bottom-color: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
}

html[data-color-theme="dark"] .card-body,
html[data-color-theme="dark"] .card-footer {
    color: #ffffff !important;
    background: transparent !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

/* =========================================================
   Global modals — rounded cards, pill buttons, dark mode
   ========================================================= */
.modal-content {
    border: 1px solid #e8edf3 !important;
    border-radius: 1rem !important;
    overflow: hidden;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16) !important;
}

.modal-header {
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1.05rem 1.25rem !important;
    border-bottom: 1px solid #e8edf3 !important;
    background: linear-gradient(180deg, #fafbfd 0%, #ffffff 100%) !important;
}

.modal-title {
    font-size: 1.05rem;
    font-weight: 650;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.modal-body {
    padding: 1.15rem 1.25rem 1.25rem !important;
}

.modal-footer {
    padding: 0.85rem 1.25rem 1.1rem !important;
    border-top: 1px solid #e8edf3 !important;
    background: #f8fafc !important;
    gap: 0.5rem;
}

.modal-footer .btn,
.modal .modal-footer .btn {
    border-radius: 999px !important;
    font-weight: 650;
    padding-inline: 1rem;
}

.modal-footer .btn-secondary,
.modal .modal-footer .btn-secondary {
    background: transparent !important;
    border: 1px solid rgba(226, 28, 35, 0.28) !important;
    color: #e21c23 !important;
    box-shadow: none !important;
}

.modal-footer .btn-secondary:hover,
.modal .modal-footer .btn-secondary:hover {
    background: rgba(226, 28, 35, 0.08) !important;
    color: #c4171e !important;
}

.modal-footer .btn-primary {
    box-shadow: 0 4px 12px rgba(226, 28, 35, 0.25);
}

.modal .form-control,
.modal .form-select {
    border-radius: 0.55rem;
    border-color: #e2e8f0;
}

.modal .form-control:focus,
.modal .form-select:focus {
    border-color: rgba(226, 28, 35, 0.45);
    box-shadow: 0 0 0 0.2rem rgba(226, 28, 35, 0.12);
}

.modal .form-label {
    font-size: 0.82rem;
    font-weight: 650;
    color: #0f172a;
}

.ucb-upload-drop {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding: 0.95rem 1rem;
    border: 1px dashed #cbd5e1;
    border-radius: 0.75rem;
    background: linear-gradient(180deg, #fbfdff 0%, #ffffff 100%);
}

.ucb-upload-drop__head {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.ucb-upload-drop__icon {
    width: 2.15rem;
    height: 2.15rem;
    border-radius: 0.55rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #e21c23;
    background: rgba(226, 28, 35, 0.08);
    border: 1px solid rgba(226, 28, 35, 0.16);
    flex-shrink: 0;
}

.ucb-upload-drop__title {
    margin: 0;
    font-size: 0.86rem;
    font-weight: 650;
    color: #0f172a;
}

.ucb-upload-drop__hint {
    margin: 0.1rem 0 0;
    font-size: 0.74rem;
    color: #64748b;
}

.ucb-upload-sample {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding: 0.85rem 1rem;
    border: 1px solid #e8edf3;
    border-radius: 0.75rem;
    background: #f8fafc;
}

.ucb-upload-sample__label {
    margin: 0;
    font-size: 0.84rem;
    font-weight: 650;
    color: #0f172a;
}

.ucb-upload-sample__meta {
    margin: 0.15rem 0 0;
    font-size: 0.74rem;
    color: #64748b;
}

.ucb-upload-sample .btn {
    border-radius: 999px;
    font-weight: 650;
    white-space: nowrap;
}

.ucb-note {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    padding: 0.75rem 0.9rem;
    border-radius: 0.65rem;
    font-size: 0.82rem;
    line-height: 1.4;
}

.ucb-note i {
    font-size: 1rem;
    margin-top: 0.1rem;
    flex-shrink: 0;
}

.ucb-note--warning {
    color: #92400e;
    background: rgba(217, 119, 6, 0.08);
    border: 1px solid rgba(217, 119, 6, 0.2);
}

html[data-color-theme="dark"] .ucb-note--warning,
[data-color-theme="dark"] .ucb-note--warning {
    color: #fcd34d !important;
    background: rgba(217, 119, 6, 0.15) !important;
    border-color: rgba(217, 119, 6, 0.3) !important;
}

html[data-color-theme="dark"] .modal-content,
[data-color-theme="dark"] .modal-content {
    background: #1a1f29 !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45) !important;
    color: #ffffff !important;
}

html[data-color-theme="dark"] .modal-header,
html[data-color-theme="dark"] .modal-footer,
[data-color-theme="dark"] .modal-header,
[data-color-theme="dark"] .modal-footer {
    background: rgba(255, 255, 255, 0.03) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

html[data-color-theme="dark"] .modal-title,
html[data-color-theme="dark"] .modal .form-label,
html[data-color-theme="dark"] .ucb-upload-drop__title,
html[data-color-theme="dark"] .ucb-upload-sample__label,
[data-color-theme="dark"] .modal-title,
[data-color-theme="dark"] .modal .form-label,
[data-color-theme="dark"] .ucb-upload-drop__title,
[data-color-theme="dark"] .ucb-upload-sample__label {
    color: #ffffff !important;
}

html[data-color-theme="dark"] .ucb-upload-drop__hint,
html[data-color-theme="dark"] .ucb-upload-sample__meta,
[data-color-theme="dark"] .ucb-upload-drop__hint,
[data-color-theme="dark"] .ucb-upload-sample__meta {
    color: rgba(255, 255, 255, 0.55) !important;
}

html[data-color-theme="dark"] .modal .form-control,
html[data-color-theme="dark"] .modal .form-select,
[data-color-theme="dark"] .modal .form-control,
[data-color-theme="dark"] .modal .form-select {
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
}

html[data-color-theme="dark"] .ucb-upload-drop,
html[data-color-theme="dark"] .ucb-upload-sample,
[data-color-theme="dark"] .ucb-upload-drop,
[data-color-theme="dark"] .ucb-upload-sample {
    background: rgba(255, 255, 255, 0.03) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
}

html[data-color-theme="dark"] .ucb-upload-drop__icon,
[data-color-theme="dark"] .ucb-upload-drop__icon {
    color: #fecaca !important;
    background: rgba(226, 28, 35, 0.18) !important;
    border-color: rgba(226, 28, 35, 0.35) !important;
}

html[data-color-theme="dark"] .modal .btn-close,
[data-color-theme="dark"] .modal .btn-close {
    filter: invert(1) grayscale(1);
    opacity: 0.75;
}

html[data-color-theme="dark"] .modal-footer .btn-secondary,
[data-color-theme="dark"] .modal-footer .btn-secondary {
    color: #ffffff !important;
    border-color: rgba(226, 28, 35, 0.45) !important;
}

