/**
 * Yak5tak admin dashboard — brand theme (storefront alignment)
 * Orange #F37021, teal #00D1B2, dark surfaces, Inter + Almarai
 */
:root {
    --y5-bg: #000000;
    --y5-surface: #121212;
    --y5-surface-2: #1a1a1a;
    --y5-orange: #f37021;
    --y5-orange-hover: #ff8c42;
    --y5-teal: #00d1b2;
    --y5-text: #ffffff;
    --y5-text-muted: #a0a0a0;
    --y5-border: rgba(255, 255, 255, 0.08);
    --y5-radius: 10px;
}

/* Typography */
html[lang="ar"] body,
html[dir="rtl"] body {
    font-family: "Almarai", "Inter", system-ui, sans-serif;
}

body {
    font-family: "Inter", "Almarai", system-ui, sans-serif;
    background: var(--y5-bg) !important;
    color: var(--y5-text-muted) !important;
}

h1, h2, h3, h4, h5, h6,
.page-title h3,
.navbar .theme-brand li.theme-text a,
.widget .widget-header h4 {
    color: var(--y5-text) !important;
}

.page-title span,
p {
    color: var(--y5-text-muted) !important;
}

::selection {
    color: var(--y5-text) !important;
    background: rgba(243, 112, 33, 0.35) !important;
}

/* Loader */
div#load_screen {
    background: var(--y5-bg) !important;
}

div#load_screen .spinner-grow,
.spinner-grow {
    color: var(--y5-orange) !important;
}

/* Top header */
.header-container {
    border-bottom: 1px solid var(--y5-border) !important;
}

.navbar {
    background: var(--y5-surface) !important;
    box-shadow: none !important;
}

.navbar .theme-text a {
    color: var(--y5-text) !important;
}

.header-container .navbar .navbar-item .nav-item.user-profile-dropdown .nav-link.user {
    color: var(--y5-text-muted) !important;
}

.navbar .navbar-item .nav-item form.form-inline input.search-form-control {
    background-color: var(--y5-surface-2) !important;
    color: var(--y5-text) !important;
    border: 1px solid var(--y5-border) !important;
}

/* Breadcrumb bar */
.sub-header-container .navbar {
    background: var(--y5-surface) !important;
    box-shadow: none !important;
    border-bottom: 1px solid var(--y5-border);
}

.sub-header-container .navbar .toggle-sidebar .sidebarCollapse,
.sub-header-container .navbar .sidebarCollapse,
.sub-header-container .navbar .toggle-sidebar,
.sub-header-container .navbar .sidebarCollapse svg {
    color: var(--y5-text) !important;
}

/* Main content */
#content,
.main-content {
    background: var(--y5-bg) !important;
}

/* Sidebar column */
#sidebar {
    background: var(--y5-surface) !important;
    border-radius: var(--y5-radius) !important;
    border: 1px solid var(--y5-border);
}

#sidebar ul.menu-categories.ps {
    border-right-color: var(--y5-border) !important;
}

#sidebar .border-underline {
    border-left-color: var(--y5-border) !important;
}

#sidebar ul.menu-categories li.menu > .dropdown-toggle {
    color: var(--y5-text) !important;
}

#sidebar ul.menu-categories li.menu > .dropdown-toggle svg {
    color: var(--y5-orange) !important;
    fill: rgba(243, 112, 33, 0.12) !important;
}

#sidebar ul.menu-categories li.menu > .dropdown-toggle:hover,
#sidebar ul.menu-categories li.menu > .dropdown-toggle[aria-expanded="true"]:not([data-active="true"]) {
    background: var(--y5-surface-2) !important;
    color: var(--y5-text) !important;
}

#sidebar ul.menu-categories li.menu > .dropdown-toggle[data-active="true"] {
    background: var(--y5-surface-2) !important;
    box-shadow: 0 0 0 1px var(--y5-border) !important;
    color: var(--y5-text) !important;
}

/* structure.css targets `span` with #000342 — beats inherited color on the anchor */
#sidebar ul.menu-categories li.menu > .dropdown-toggle[data-active="true"] span,
#sidebar ul.menu-categories li.menu > .dropdown-toggle[data-active="true"]:hover span {
    color: var(--y5-text) !important;
}

#sidebar ul.menu-categories li.menu > .dropdown-toggle[data-active="true"] svg,
#sidebar ul.menu-categories li.menu > .dropdown-toggle:hover svg {
    color: var(--y5-teal) !important;
    fill: rgba(0, 209, 178, 0.15) !important;
}

#sidebar ul.menu-categories li.menu > .dropdown-toggle[aria-expanded="true"]:not([data-active="true"]) svg {
    color: var(--y5-orange) !important;
}

#sidebar ul.menu-categories ul.submenu > li a {
    color: var(--y5-text-muted) !important;
}

#sidebar ul.menu-categories ul.submenu > li a:hover,
#sidebar ul.menu-categories ul.submenu > li.active a {
    color: var(--y5-teal) !important;
}

#sidebar ul.menu-categories li.menu ul.submenu > li a:before {
    background-color: var(--y5-text-muted) !important;
}

#sidebar ul.menu-categories li.menu ul.submenu > li a:hover:before,
#sidebar ul.menu-categories li.menu ul.submenu > li.active a:before,
#sidebar ul.menu-categories ul.submenu li > [data-active="true"]:before {
    background-color: var(--y5-orange) !important;
}

#sidebar ul.menu-categories ul.submenu li > a[data-active="true"] {
    color: var(--y5-teal) !important;
}

#sidebar ul.menu-categories ul.submenu li > [data-active="true"] i {
    color: var(--y5-teal) !important;
}

#sidebar ul.menu-categories ul.submenu > li ul.sub-submenu > li a:hover,
#sidebar ul.menu-categories ul.submenu > li ul.sub-submenu > li.active a {
    color: var(--y5-teal) !important;
}

.shadow-bottom {
    background: linear-gradient(var(--y5-surface) 30%, rgba(18, 18, 18, 0)) !important;
}

/* Cards / widgets */
.widget {
    background: var(--y5-surface) !important;
    border: 1px solid var(--y5-border) !important;
    box-shadow: none !important;
}

.widget .widget-heading,
.widget.widget-chart-two .widget-heading,
.widget.widget-chart-three .widget-heading {
    border-bottom-color: var(--y5-border) !important;
}

.widget .widget-heading h5,
.widget.widget-chart-two .widget-heading h5,
.widget.widget-chart-three .widget-heading h5,
.widget .widget-activity-three .widget-heading h5,
.widget-activity-three .widget-heading h5,
.widget .widget-activity-five .widget-heading h5,
.widget-activity-five .widget-heading h5,
.widget-activity-one .widget-heading h5,
.widget-activity-one .w-detail h4 {
    color: var(--y5-text) !important;
}

.widget-content-area,
.widget .widget-content {
    background: var(--y5-surface) !important;
    color: var(--y5-text-muted) !important;
}

.widget .widget-content-area {
    border-bottom-left-radius: var(--y5-radius);
    border-bottom-right-radius: var(--y5-radius);
}

.widget-box .widget-header,
.widget .widget-header {
    background: var(--y5-surface) !important;
    border-color: var(--y5-border) !important;
}

/* Stat widgets (dash_1) */
.widget-two {
    background: var(--y5-surface) !important;
    border: 1px solid var(--y5-border) !important;
    box-shadow: none !important;
}

.widget-two .w-numeric-value .w-value {
    color: var(--y5-text) !important;
}

.widget-two .w-numeric-value .w-numeric-title {
    color: var(--y5-text-muted) !important;
}

.widget-two .w-numeric-value .w-icon {
    background: rgba(243, 112, 33, 0.15) !important;
}

.widget-two .w-numeric-value svg {
    color: var(--y5-orange) !important;
}

.widget-one {
    background: linear-gradient(135deg, #c44f10 0%, var(--y5-orange) 50%, #ff9a4d 100%) !important;
}

/* Tables & DataTables */
.table,
table.dataTable,
table#style-3,
.table > thead > tr > th,
.table > tbody > tr > td,
.table > tbody > tr > th {
    color: var(--y5-text-muted) !important;
    border-color: var(--y5-border) !important;
    background: transparent !important;
}

.table thead th,
table.dataTable thead th {
    color: var(--y5-text) !important;
    background: var(--y5-surface-2) !important;
    border-color: var(--y5-border) !important;
}

.table-striped tbody tr:nth-of-type(odd) {
    background: rgba(255, 255, 255, 0.02) !important;
}

.table > tbody > tr:hover {
    background: rgba(0, 209, 178, 0.06) !important;
}

div.dataTables_wrapper .dataTables_length select,
div.dataTables_wrapper .dataTables_filter input {
    background: var(--y5-surface-2) !important;
    color: var(--y5-text) !important;
    border: 1px solid var(--y5-border) !important;
}

/* Forms */
.form-control,
select.form-control,
.custom-select,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="datetime-local"],
textarea {
    background: var(--y5-surface-2) !important;
    color: var(--y5-text) !important;
    border: 1px solid var(--y5-border) !important;
}

.form-control:focus {
    border-color: var(--y5-teal) !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 209, 178, 0.15) !important;
}

/* Form labels: readable on dark (main.css .form-group label + .text-dark use #3b3f5c / #66452c w/ !important on .text-dark) */
label,
.col-form-label {
    color: var(--y5-text) !important;
}

/* Higher specificity + load order (theme after @stack): beat Bootstrap/main .text-dark !important */
#content .form-group label,
#content label,
#content .col-form-label,
#content label.text-dark,
#content .col-form-label.text-dark,
#content .form-group label.text-dark,
#content .text-dark,
body.form label,
body.form .col-form-label,
body.form label.text-dark,
body.form .text-dark {
    color: var(--y5-text) !important;
}

/* Buttons */
.btn-primary {
    background-color: var(--y5-orange) !important;
    border-color: var(--y5-orange) !important;
    color: #0a0a0a !important;
    font-weight: 600 !important;
    border-radius: var(--y5-radius) !important;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--y5-orange-hover) !important;
    border-color: var(--y5-orange-hover) !important;
    color: #000 !important;
}

.btn-secondary,
.btn-default {
    background: var(--y5-surface-2) !important;
    border-color: var(--y5-border) !important;
    color: var(--y5-text) !important;
}

.btn-outline-primary {
    color: var(--y5-orange) !important;
    border-color: var(--y5-orange) !important;
    background: transparent !important;
}

.btn-outline-primary:hover {
    background: var(--y5-orange) !important;
    color: #0a0a0a !important;
}

a {
    color: var(--y5-teal);
}

a:hover {
    color: var(--y5-orange);
}

/* Pagination & badges */
.page-item .page-link {
    background: var(--y5-surface-2) !important;
    border-color: var(--y5-border) !important;
    color: var(--y5-text) !important;
}

.page-item.active .page-link {
    background: var(--y5-orange) !important;
    border-color: var(--y5-orange) !important;
    color: #0a0a0a !important;
}

.badge-primary {
    background: var(--y5-orange) !important;
    color: #0a0a0a !important;
}

/* Dropdowns & modals */
.dropdown-menu,
.header-container .navbar .navbar-item .nav-item.dropdown .dropdown-menu {
    background: var(--y5-surface) !important;
    border: 1px solid var(--y5-border) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5) !important;
}

/* Header dropdowns: arrow/caret (structure.css used #fff / #fafafa — match dark panel) */
.header-container .navbar .navbar-item .nav-item.dropdown .dropdown-menu::after,
.header-container .navbar .navbar-item .nav-item.dropdown .dropdown-menu:after,
.navbar .navbar-item .nav-item.dropdown .dropdown-menu::after,
.navbar .navbar-item .nav-item.dropdown .dropdown-menu:after,
.header-container .navbar .language-dropdown .dropdown-menu::after,
.header-container .navbar .language-dropdown .dropdown-menu:after {
    border-left-color: transparent !important;
    border-right-color: transparent !important;
    border-top-color: transparent !important;
    border-bottom-color: var(--y5-surface) !important;
}

.header-container .navbar .language-dropdown .dropdown-menu::before,
.header-container .navbar .language-dropdown .dropdown-menu:before {
    border-left-color: transparent !important;
    border-right-color: transparent !important;
    border-bottom-color: var(--y5-surface) !important;
}

@media (max-width: 575px) {
    .navbar .navbar-item .nav-item.dropdown .dropdown-menu::after,
    .navbar .navbar-item .nav-item.dropdown .dropdown-menu:after {
        border-bottom-color: var(--y5-surface) !important;
    }
}

.dropdown-item,
.header-container .navbar .dropdown-item {
    color: var(--y5-text-muted) !important;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: var(--y5-surface-2) !important;
    color: var(--y5-text) !important;
}

/* Do not let generic dropdown hover recolor the avatar menu rows (structure + Bootstrap) */
.navbar .navbar-item .nav-item.user-profile-dropdown .dropdown-menu > div > .dropdown-item:hover,
.navbar .navbar-item .nav-item.user-profile-dropdown .dropdown-menu > div > .dropdown-item:focus {
    background: transparent !important;
    color: inherit !important;
}

/* Avatar: profile + logout (no light divider “smile”; single border between rows) */
.navbar .navbar-item .nav-item.user-profile-dropdown .dropdown-menu {
    padding: 0.5rem !important;
    border-radius: 10px !important;
}

.navbar .navbar-item .nav-item.user-profile-dropdown .dropdown-menu .dropdown-item {
    background: transparent !important;
    border-radius: 8px;
    padding: 0;
}

.navbar .navbar-item .nav-item.user-profile-dropdown .dropdown-menu .dropdown-item:not(:last-child) {
    border-bottom: 1px solid var(--y5-border) !important;
}

.navbar .navbar-item .nav-item.user-profile-dropdown .dropdown-menu .dropdown-item a {
    color: var(--y5-text) !important;
    padding: 0.65rem 0.75rem !important;
    display: flex !important;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    border-radius: 6px;
}

html[dir="rtl"] .navbar .navbar-item .nav-item.user-profile-dropdown .dropdown-menu .dropdown-item a {
    text-align: right;
}

.navbar .navbar-item .nav-item.user-profile-dropdown .dropdown-menu .dropdown-item a svg {
    color: var(--y5-teal) !important;
    fill: rgba(0, 209, 178, 0.12) !important;
    margin: 0 !important;
    flex-shrink: 0;
}

.navbar
    .navbar-item
    .nav-item.user-profile-dropdown
    .dropdown-menu
    .dropdown-item:not(.y5-profile-logout):hover,
.navbar
    .navbar-item
    .nav-item.user-profile-dropdown
    .dropdown-menu
    .dropdown-item:not(.y5-profile-logout):focus {
    background: transparent !important;
}

.navbar
    .navbar-item
    .nav-item.user-profile-dropdown
    .dropdown-menu
    .dropdown-item:not(.y5-profile-logout)
    a:hover,
.navbar
    .navbar-item
    .nav-item.user-profile-dropdown
    .dropdown-menu
    .dropdown-item:not(.y5-profile-logout)
    a:focus {
    background: rgba(0, 209, 178, 0.08) !important;
    color: var(--y5-text) !important;
}

.navbar .navbar-item .nav-item.user-profile-dropdown .dropdown-menu .dropdown-item.y5-profile-logout {
    border-top: none !important;
    border-bottom: none !important;
    padding: 0.5rem 0.45rem 0.45rem !important;
    background: transparent !important;
}

.navbar .navbar-item .nav-item.user-profile-dropdown .dropdown-menu .dropdown-item.y5-profile-logout:hover,
.navbar .navbar-item .nav-item.user-profile-dropdown .dropdown-menu .dropdown-item.y5-profile-logout:focus {
    background: transparent !important;
}

.navbar .navbar-item .nav-item.user-profile-dropdown .dropdown-menu .y5-profile-logout form {
    margin: 0;
    width: 100%;
}

.navbar .navbar-item .nav-item.user-profile-dropdown .dropdown-menu .y5-profile-logout-btn {
    display: block;
    width: 100%;
    background: var(--y5-orange) !important;
    border: 1px solid var(--y5-orange) !important;
    color: #0a0a0a !important;
    font-weight: 600 !important;
    font-size: 0.875rem;
    border-radius: 999px !important;
    padding: 0.5rem 1rem !important;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.navbar .navbar-item .nav-item.user-profile-dropdown .dropdown-menu .y5-profile-logout-btn:hover,
.navbar .navbar-item .nav-item.user-profile-dropdown .dropdown-menu .y5-profile-logout-btn:focus {
    background: var(--y5-orange-hover) !important;
    border-color: var(--y5-orange-hover) !important;
    color: #000 !important;
    box-shadow: 0 0 0 0.2rem rgba(243, 112, 33, 0.25) !important;
    outline: none;
}

.modal-content {
    background: var(--y5-surface) !important;
    border: 1px solid var(--y5-border) !important;
    color: var(--y5-text-muted) !important;
}

.modal-header,
.modal-footer {
    border-color: var(--y5-border) !important;
}

/* Footer */
.footer-wrapper .footer-section p,
.footer-wrapper .footer-section p a {
    color: var(--y5-text-muted) !important;
}

/* Breadcrumb in sub-header */
.sub-header-container .breadcrumb-one .breadcrumb-item.active,
.sub-header-container .breadcrumb-one .breadcrumb-item.active a,
.sub-header-container .breadcrumb-one .breadcrumb-item span,
.sub-header-container .breadcrumb-one .breadcrumb-item a {
    color: var(--y5-text) !important;
}

.sub-header-container .breadcrumb-one .breadcrumb-item + .breadcrumb-item::before,
.sub-header-container .breadcrumb-one .breadcrumb-item a svg {
    color: var(--y5-text-muted) !important;
    fill: var(--y5-text-muted) !important;
}

/* Auth pages (form-2) */
body .form-form .form-container .form-content {
    background: var(--y5-surface) !important;
    border: 1px solid var(--y5-border) !important;
    color: var(--y5-text-muted) !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5) !important;
}

body .form-form .form-container .form-content h1,
body .form-form .form-form-wrap h1 .brand-name,
body .form-form .form-form-wrap .user-meta p {
    color: var(--y5-text) !important;
}

body .form-form .form-form-wrap form .field-wrapper label {
    color: var(--y5-text) !important;
}

body .form-form .form-form-wrap form .field-wrapper input {
    color: var(--y5-text) !important;
    background: var(--y5-surface-2) !important;
    border: 1px solid var(--y5-border) !important;
}

body .form-form .form-form-wrap form .field-wrapper svg:not(.feather-eye) {
    color: var(--y5-teal) !important;
}

body.auth-brand-bg {
    background: var(--y5-bg) !important;
}

/* Login & auth: template uses .btn-danger for submit — align with brand CTA */
.form-form .btn-danger,
.form-form .btn-primary {
    background-color: var(--y5-orange) !important;
    border-color: var(--y5-orange) !important;
    color: #0a0a0a !important;
    font-weight: 600 !important;
    border-radius: var(--y5-radius) !important;
}

.form-form .btn-danger:hover,
.form-form .btn-primary:hover {
    background-color: var(--y5-orange-hover) !important;
    border-color: var(--y5-orange-hover) !important;
    color: #000 !important;
}

body.form .form-form .form-container .form-content a.forgot-pass-link,
body .form-form a {
    color: var(--y5-teal) !important;
}

/* Apex / chart text */
.apexcharts-text,
.apexcharts-legend-text {
    fill: var(--y5-text-muted) !important;
    color: var(--y5-text-muted) !important;
}

.apexcharts-title-text {
    fill: var(--y5-text) !important;
}

/* --------------------------------------------------------------------------
   Search / filter accordion (list & report pages: "Filter Options" / خيارات البحث)
   Light header bar on dark dashboard; works in LTR and RTL
   -------------------------------------------------------------------------- */
.widget-content-area #accordion > .card {
    background: var(--y5-surface) !important;
    border: 1px solid var(--y5-border) !important;
    border-radius: 8px !important;
    overflow: hidden;
    box-shadow: none !important;
}

.widget-content-area #accordion .card-header {
    background: #f5f6f7 !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
    padding: 0.65rem 1rem !important;
    margin-bottom: 0 !important;
}

.widget-content-area #accordion .card-header h5 {
    width: 100%;
    margin: 0 !important;
}

.widget-content-area #accordion .card-header .btn {
    width: 100%;
    max-width: 100%;
    display: block;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: #4d4d4d !important;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.4;
    padding: 0.25rem 0;
    text-decoration: none !important;
}

.widget-content-area #accordion .card-header .btn:hover,
.widget-content-area #accordion .card-header .btn:focus {
    color: #333333 !important;
    background: transparent !important;
    box-shadow: none !important;
}

html[dir="rtl"] .widget-content-area #accordion .card-header .btn {
    text-align: right;
}

html[dir="ltr"] .widget-content-area #accordion .card-header .btn {
    text-align: left;
}

.widget-content-area #accordion .card-body {
    background: var(--y5-surface-2) !important;
    color: var(--y5-text-muted) !important;
    border-top: 1px solid var(--y5-border) !important;
}

/* Search submit buttons inside accordion (green bootstrap) → brand */
.widget-content-area #accordion .card-body .btn-success,
.widget-content-area #accordion .card-body .bg-success {
    background-color: var(--y5-orange) !important;
    border-color: var(--y5-orange) !important;
    color: #0a0a0a !important;
    font-weight: 600;
    border-radius: var(--y5-radius);
}

.widget-content-area #accordion .card-body .btn-success:hover,
.widget-content-area #accordion .card-body .bg-success:hover {
    background-color: var(--y5-orange-hover) !important;
    border-color: var(--y5-orange-hover) !important;
    color: #000 !important;
}

/* --------------------------------------------------------------------------
   File upload — file-upload-with-preview (plugins/file-upload) + dropify
   -------------------------------------------------------------------------- */
.custom-file-container label,
.custom-file-container label a {
    color: var(--y5-text) !important;
}

.custom-file-container label .custom-file-container__image-clear {
    color: var(--y5-text-muted) !important;
    opacity: 0.9;
}

.custom-file-container label .custom-file-container__image-clear:hover {
    color: var(--y5-teal) !important;
}

.custom-file-container__custom-file__custom-file-control {
    background-color: var(--y5-surface-2) !important;
    border: 1px solid var(--y5-border) !important;
    color: var(--y5-text) !important;
    border-radius: 8px !important;
}

.custom-file-container__custom-file__custom-file-control__button {
    background: rgba(243, 112, 33, 0.18) !important;
    color: var(--y5-orange) !important;
    border-left: 1px solid var(--y5-border) !important;
    font-weight: 600 !important;
    border-radius: 0 7px 7px 0;
}

html[dir="rtl"] .custom-file-container__custom-file__custom-file-control__button {
    right: auto !important;
    left: 0 !important;
    border-left: none !important;
    border-right: 1px solid var(--y5-border) !important;
    border-radius: 7px 0 0 7px;
}

html[dir="rtl"] .custom-file-container__custom-file__custom-file-control {
    text-align: right;
    padding-left: 7rem;
    padding-right: 10px;
}

/* Preview panel: dark frame; real uploads stay clear when plugin adds --active */
.custom-file-container__image-preview {
    background-color: var(--y5-surface-2) !important;
    border: 1px solid var(--y5-border) !important;
    border-radius: 8px !important;
}

.custom-file-container__image-preview:not(.custom-file-container__image-preview--active) {
    filter: brightness(0.55) contrast(0.95);
    opacity: 0.95;
}

.custom-file-container__image-preview.custom-file-container__image-preview--active {
    filter: none !important;
    opacity: 1 !important;
}

/* Multi-image tiles */
.custom-file-container__image-multi-preview {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4) !important;
}

.custom-file-container__image-multi-preview__single-image-clear {
    background: var(--y5-surface) !important;
    border: 1px solid var(--y5-border) !important;
}

.custom-file-container__image-multi-preview__single-image-clear:hover {
    background: var(--y5-surface-2) !important;
}

.custom-file-container__image-multi-preview__single-image-clear__icon {
    color: var(--y5-teal) !important;
}

/* Dropify (role pages, some forms) */
#content .dropify-wrapper,
.widget-content .dropify-wrapper {
    background: var(--y5-surface-2) !important;
    border: 1px solid var(--y5-border) !important;
    border-radius: 8px !important;
}

#content .dropify-wrapper .dropify-message,
.widget-content .dropify-wrapper .dropify-message {
    color: var(--y5-text-muted) !important;
}

#content .dropify-wrapper .dropify-message p,
.widget-content .dropify-wrapper .dropify-message p {
    color: var(--y5-text-muted) !important;
}

#content .dropify-wrapper .dropify-clear,
.widget-content .dropify-wrapper .dropify-clear {
    background: var(--y5-surface) !important;
    color: var(--y5-text-muted) !important;
    border: 1px solid var(--y5-border) !important;
}

#content .dropify-wrapper .dropify-clear:hover,
.widget-content .dropify-wrapper .dropify-clear:hover {
    background: var(--y5-surface-2) !important;
    color: var(--y5-teal) !important;
}

#content .dropify-wrapper .dropify-preview,
.widget-content .dropify-wrapper .dropify-preview {
    background: var(--y5-surface) !important;
}

/* Native file input on dark forms (e.g. simple class="form-control" file fields) */
input[type="file"].form-control,
.widget-content-area input[type="file"] {
    background: var(--y5-surface-2) !important;
    color: var(--y5-text-muted) !important;
    border: 1px solid var(--y5-border) !important;
    border-radius: 8px !important;
    padding: 0.4rem 0.6rem !important;
}

/* --------------------------------------------------------------------------
   Select2 (admin — searchable multiselect, matches dark brand theme)
   -------------------------------------------------------------------------- */
#content .select2-container--default .select2-selection--multiple,
#content .select2-container--default .select2-selection--single {
    background: var(--y5-surface-2) !important;
    border: 1px solid var(--y5-border) !important;
    border-radius: var(--y5-radius) !important;
    min-height: 3rem;
}

#content .select2-container--default .select2-selection--multiple {
    min-height: 200px;
    padding: 0.5rem 0.5rem 0.35rem 0.5rem !important;
    align-items: flex-start;
}

#content .select2-container--default .select2-selection--multiple .select2-selection__rendered {
    padding: 0 0.2rem 0.15rem 0.2rem !important;
    width: 100%;
}

#content .select2-container--default .select2-selection--multiple .select2-selection__choice {
    background: rgba(243, 112, 33, 0.18) !important;
    border: 1px solid var(--y5-border) !important;
    border-radius: 6px !important;
    color: var(--y5-text) !important;
    margin: 0.2rem 0.2rem 0.2rem 0 !important;
    padding: 0.2rem 0.35rem !important;
    max-width: 100%;
}

#content .select2-container[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
    margin: 0.2rem 0 0.2rem 0.2rem !important;
}

#content .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: var(--y5-text-muted) !important;
    border-color: var(--y5-border) !important;
    margin-right: 0.2rem;
}

#content .select2-container[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove {
    margin-right: 0;
    margin-left: 0.2rem;
}

#content .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
    color: var(--y5-orange) !important;
    background: transparent !important;
}

#content .select2-container--default .select2-search--inline .select2-search__field {
    background: transparent !important;
    color: var(--y5-text) !important;
    border: none !important;
    margin-top: 0.25rem !important;
    padding: 0.2rem 0.35rem !important;
    min-height: 1.4rem;
}

#content .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: var(--y5-text) !important;
    line-height: 1.5 !important;
    padding-left: 0.85rem;
    padding-right: 0.85rem;
}

#content .select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-color: var(--y5-text-muted) transparent transparent transparent !important;
}

#content .select2-dropdown,
#content .select2-container--default .select2-search--dropdown .select2-search__field {
    background: var(--y5-surface) !important;
    border: 1px solid var(--y5-border) !important;
    color: var(--y5-text) !important;
    border-radius: 8px !important;
}

#content .select2-container--default .select2-search--dropdown .select2-search__field {
    margin: 0.35rem 0.5rem 0.5rem !important;
    width: calc(100% - 1rem) !important;
    padding: 0.45rem 0.65rem !important;
}

#content .select2-results__options {
    padding: 0.25rem 0 !important;
    max-height: 280px !important;
}

#content .select2-container--default .select2-results__option {
    color: var(--y5-text) !important;
    padding: 0.5rem 0.75rem !important;
}

#content .select2-container--default .select2-results__option[aria-disabled="true"] {
    color: var(--y5-text-muted) !important;
    opacity: 0.6;
}

#content .select2-container--default .select2-results__option--highlighted[aria-selected] {
    background: rgba(0, 209, 178, 0.22) !important;
    color: var(--y5-text) !important;
}

#content .select2-container--default .select2-results__option[aria-selected="true"] {
    background: rgba(243, 112, 33, 0.15) !important;
}

#content .select2-container--default .select2-results__message {
    color: var(--y5-text-muted) !important;
    padding: 0.5rem 0.75rem !important;
}
