/* button  */


.input-danger,
.input-danger:-webkit-autofill,
.input-danger:-webkit-autofill:focus {
	border-color: #dc3545 !important;
	/*    border-color: var(--danger) !important;*/
	padding-right: calc(1.5em + 0.75rem);
	background-image: url(../icons/false.png);
	background-repeat: no-repeat;
	background-position: right calc(0.375em + 0.1875rem) center;
	background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.input-success,
.input-success:-webkit-autofill,
.input-success:-webkit-autofill:focus {
	border-color: #28a745 !important;
	/*    border-color: var(--success) !important;*/
	padding-right: calc(1.5em + 0.75rem);
	background-image: url(../icons/true.png);
	background-repeat: no-repeat;
	background-position: right calc(0.375em + 0.1875rem) center;
	background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}


.input-success:focus {
	border-color: #28a745;
	-webkit-box-shadow: 0 0 0 0.2rem rgb(40 167 69 / 25%);
	box-shadow: 0 0 0 0.2rem rgb(40 167 69 / 25%);
}

.input-danger:focus {
	border-color: #dc3545;
	-webkit-box-shadow: 0 0 0 0.2rem rgb(220 53 69 / 25%);
	box-shadow: 0 0 0 0.2rem rgb(220 53 69 / 25%);
}

.input-error,
.input-error:-webkit-autofill,
.input-error:-webkit-autofill:focus {
	margin-top: 0.3rem;
	font-size: 90%;
	font-style: italic;
	color: #dc3545;
	font-weight: bold;
	display: none;
}

select.input-success,
select.input-danger {
	background-position: right calc(0.975em + 0.1875rem) center !important;
}


.sidebar-wrapper .sidebar-menu > .nav-item > .nav-treeview {
	padding-left: 1rem;
}


.sidebar-wrapper .sidebar-menu > .nav-item.menu-open > .nav-link {
    background: cornflowerblue;
}


.custom-text-editor {
	min-height: 100px;
}


table.vertical-align-middle tbody tr td {
	vertical-align: middle;
}






/* LIGHT MODE */
[data-bs-theme="light"] body {
    background: #f8f9fa;
}

/* DARK MODE BACKGROUND */
[data-bs-theme="dark"] body {
    background: linear-gradient(135deg, #0b0f19, #1a1f2b);
}



/* NORMAL CARD (LIGHT MODE) */
[data-bs-theme="light"] .login-card {
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

/* GLASS EFFECT (DARK MODE) */
[data-bs-theme="dark"] .login-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    color: #fff;
}

/* Inputs dark mode fix */
[data-bs-theme="dark"] .form-control {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
}

[data-bs-theme="dark"] .form-control::placeholder {
    color: rgba(255,255,255,0.6);
}

[data-bs-theme="dark"] .form-control:focus {
    background: rgba(255,255,255,0.12);
    border-color: #0d6efd;
    color: #fff;
    box-shadow: none;
}

/* Toggle button */
.theme-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 20px;
    border-radius: 50%;
    width: 45px;
    height: 45px;
}

/* Icon animation */
#themeIcon {
    transition: transform 0.5s ease, opacity 0.3s ease;
}

.icon-animate {
    transform: rotate(180deg) scale(0.6);
    opacity: 0;
}


/* Select2 container */
[data-bs-theme="dark"] .select2-container--default .select2-selection--single {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #fff !important;
    height: 38px;
    display: flex;
    align-items: center;
}

/* Selected text */
[data-bs-theme="dark"] .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #fff !important;
    line-height: normal !important;
}

/* Arrow */
[data-bs-theme="dark"] .select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-color: #fff transparent transparent transparent !important;
}

/* Dropdown */
[data-bs-theme="dark"] .select2-dropdown {
    background: rgba(20, 25, 40, 0.95) !important;
    border: 1px solid rgba(255,255,255,0.15) !important;
    backdrop-filter: blur(10px);
    color: #fff;
}

[data-bs-theme="dark"] .select2-selection {
    background: rgb(50 54 58) !important;
    border: 1px solid rgba(255,255,255,0.15) !important;
    backdrop-filter: blur(10px);
    color: #fff;
}

[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered{
	
    color: #fff;
}


/* Options */
[data-bs-theme="dark"] .select2-results__option {
    color: #fff !important;
}

/* Hover */
[data-bs-theme="dark"] .select2-results__option--highlighted {
    background: #0d6efd !important;
    color: #fff !important;
}

/* Search box */
[data-bs-theme="dark"] .select2-search__field {
    background: rgba(255,255,255,0.08) !important;
    color: #fff !important;
    border: 1px solid rgba(255,255,255,0.2) !important;
}

/* Placeholder */
[data-bs-theme="dark"] .select2-selection__placeholder {
    color: rgba(255,255,255,0.6) !important;
}


/* Toolbar */
[data-bs-theme="dark"] .ql-toolbar {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255,255,255,0.15) !important;
    backdrop-filter: blur(10px);
    border-radius: 10px 10px 0 0;
}

/* Toolbar icons */
[data-bs-theme="dark"] .ql-toolbar button svg {
    fill: #fff !important;
}

[data-bs-theme="dark"] .ql-toolbar button:hover svg {
    fill: #0d6efd !important;
}

/* Active button */
[data-bs-theme="dark"] .ql-toolbar button.ql-active svg {
    fill: #0d6efd !important;
}

/* Editor container */
[data-bs-theme="dark"] .ql-container {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255,255,255,0.15) !important;
    border-top: none;
    color: #fff;
    backdrop-filter: blur(10px);
    border-radius: 0 0 10px 10px;
}

/* Editor text */
[data-bs-theme="dark"] .ql-editor {
    color: #fff;
}

/* Placeholder */
[data-bs-theme="dark"] .ql-editor.ql-blank::before {
    color: rgba(255,255,255,0.5);
}

/* Dropdown (font/size etc.) */
[data-bs-theme="dark"] .ql-picker {
    color: #fff;
}

[data-bs-theme="dark"] .ql-picker-options {
    background: rgba(20, 25, 40, 0.95);
    border: 1px solid rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
}

[data-bs-theme="dark"] .ql-picker-item {
    color: #fff;
}

[data-bs-theme="dark"] .ql-picker-item:hover {
    background: #0d6efd;
}

/* Tooltip (links etc.) */
[data-bs-theme="dark"] .ql-tooltip {
    background: rgba(20, 25, 40, 0.95);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.15);
}


/* FIX QUILL ICON COLORS IN DARK MODE */
[data-bs-theme="dark"] .ql-toolbar .ql-stroke {
    stroke: #ffffff !important;
}

[data-bs-theme="dark"] .ql-toolbar .ql-fill {
    fill: #ffffff !important;
}

[data-bs-theme="dark"] .ql-toolbar .ql-even {
    fill: #ffffff !important;
}

/* Hover state */
[data-bs-theme="dark"] .ql-toolbar button:hover .ql-stroke,
[data-bs-theme="dark"] .ql-toolbar button:hover .ql-fill {
    stroke: #0d6efd !important;
    fill: #0d6efd !important;
}

/* Active button */
[data-bs-theme="dark"] .ql-toolbar button.ql-active .ql-stroke,
[data-bs-theme="dark"] .ql-toolbar button.ql-active .ql-fill {
    stroke: #0d6efd !important;
    fill: #0d6efd !important;
}



/* =========================================================
   DARK GLASS POPUP CONTAINER
========================================================= */
[data-bs-theme="dark"] .swal-dark {
    background: rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.15);
    color: #fff;
}


/* =========================================================
   INNER CONTENT (YOUR UI)
========================================================= */

[data-bs-theme="dark"] .swal-dark .card,
[data-bs-theme="dark"] .swal-dark .box {
    background: rgba(255,255,255,0.05) !important;
    border-color: rgba(255,255,255,0.15) !important;
    color: #fff;
}

/* Section headers */
[data-bs-theme="dark"] .swal-dark .card-header {
    background: rgba(0,0,0,0.4) !important;
    color: #fff !important;
}


/* =========================================================
   TABLE FIX (MOST IMPORTANT)
========================================================= */

[data-bs-theme="dark"] .swal-dark table {
    color: #fff !important;
}

[data-bs-theme="dark"] .swal-dark table thead {
    background: rgba(0,0,0,0.6) !important;
}

[data-bs-theme="dark"] .swal-dark table tbody tr {
    background: rgba(255,255,255,0.03);
}

[data-bs-theme="dark"] .swal-dark table tbody tr:hover {
    background: rgba(255,255,255,0.08);
}

[data-bs-theme="dark"] .swal-dark th,
[data-bs-theme="dark"] .swal-dark td {
    border-color: rgba(255,255,255,0.1) !important;
}


/* =========================================================
   TEXT + LABEL FIX
========================================================= */

[data-bs-theme="dark"] .swal-dark * {
    color: #fff !important;
}

[data-bs-theme="dark"] .swal-dark .text-muted {
    color: rgba(255,255,255,0.6) !important;
}



/* =========================================================
   GLOBAL BUTTON BASE (ALL MODES)
========================================================= */

.btn {
    border-radius: 8px;
    transition: all 0.2s ease;
    font-weight: 500;
}

/* Slight press effect */
.btn:active {
    transform: scale(0.97);
}


/* =========================================================
   LIGHT MODE (DEFAULT BOOTSTRAP IMPROVED)
========================================================= */

[data-bs-theme="light"] .btn-outline-dark {
    border-color: #dee2e6;
    color: #212529;
}

[data-bs-theme="light"] .btn-outline-dark:hover {
    background: #212529;
    color: #fff;
}


/* =========================================================
   DARK MODE - MAIN FIX (IMPORTANT)
========================================================= */

/* Fix ALL outline buttons */
[data-bs-theme="dark"] .btn-outline-dark,
[data-bs-theme="dark"] .btn-outline-secondary,
[data-bs-theme="dark"] .btn-outline-primary {
    border: 1px solid rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.05);
    color: #fff;
    backdrop-filter: blur(6px);
}

/* Hover */
[data-bs-theme="dark"] .btn-outline-dark:hover,
[data-bs-theme="dark"] .btn-outline-secondary:hover,
[data-bs-theme="dark"] .btn-outline-primary:hover {
    background: rgba(13,110,253,0.15);
    border-color: #0d6efd;
    color: #0d6efd;
}


/* =========================================================
   SOLID BUTTONS (DARK MODE TUNE)
========================================================= */

[data-bs-theme="dark"] .btn-primary {
    background: #0d6efd;
    border: none;
}

[data-bs-theme="dark"] .btn-primary:hover {
    background: #0b5ed7;
}

[data-bs-theme="dark"] .btn-danger {
    background: #dc3545;
    border: none;
}

[data-bs-theme="dark"] .btn-danger:hover {
    background: #bb2d3b;
}


/* =========================================================
   LIGHT BUTTON FIX (IMPORTANT)
========================================================= */

[data-bs-theme="dark"] .btn-light {
    background: rgba(255,255,255,0.1);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
}

[data-bs-theme="dark"] .btn-light:hover {
    background: rgba(255,255,255,0.2);
}


/* =========================================================
   ICON BUTTON IMPROVEMENT
========================================================= */

.btn i {
    margin-right: 5px;
    transition: transform 0.2s ease;
}

.btn:hover i {
    transform: scale(1.1);
}


/* =========================================================
   DATATABLE BASE
========================================================= */

[data-bs-theme="dark"] table.dataTable {
    color: #fff;
    background: transparent;
}

/* Table wrapper spacing */
.dataTables_wrapper {
    font-size: 14px;
}


/* =========================================================
   HEADER (THEAD)
========================================================= */

[data-bs-theme="dark"] table.dataTable thead th {
    background: rgba(0,0,0,0.6);
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* Sorting icons visibility */
[data-bs-theme="dark"] table.dataTable thead .sorting:before,
[data-bs-theme="dark"] table.dataTable thead .sorting:after {
    color: rgba(255,255,255,0.6);
}


/* =========================================================
   BODY (TBODY)
========================================================= */

[data-bs-theme="dark"] table.dataTable tbody tr {
    background: rgba(255,255,255,0.03);
    transition: background 0.2s ease;
}

/* Hover */
[data-bs-theme="dark"] table.dataTable tbody tr:hover {
    background: rgba(255,255,255,0.08);
}

/* Borders */
[data-bs-theme="dark"] table.dataTable th,
[data-bs-theme="dark"] table.dataTable td {
    border-color: rgba(255,255,255,0.1) !important;
}


/* =========================================================
   PAGINATION
========================================================= */

[data-bs-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button {
    background: rgba(255,255,255,0.05);
    color: #fff !important;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 6px;
    margin: 2px;
}

/* Hover */
[data-bs-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: rgba(13,110,253,0.15);
    border-color: #0d6efd;
    color: #0d6efd !important;
}

/* Active */
[data-bs-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: #0d6efd !important;
    color: #fff !important;
    border-color: #0d6efd;
}


/* =========================================================
   SEARCH INPUT
========================================================= */

[data-bs-theme="dark"] .dataTables_filter input {
    background: rgba(255,255,255,0.08);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 6px;
    padding: 4px 8px;
}

[data-bs-theme="dark"] .dataTables_filter input::placeholder {
    color: rgba(255,255,255,0.6);
}


/* =========================================================
   LENGTH SELECT (Dropdown)
========================================================= */

[data-bs-theme="dark"] .dataTables_length select {
    background: rgba(255,255,255,0.08);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 6px;
}


/* =========================================================
   INFO TEXT
========================================================= */

[data-bs-theme="dark"] .dataTables_info {
    color: rgba(255,255,255,0.7);
}


/* =========================================================
   PROCESSING LOADER
========================================================= */

[data-bs-theme="dark"] .dataTables_processing {
    background: rgba(0,0,0,0.7);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
}


/* =========================================================
   STRIPED TABLE (OPTIONAL)
========================================================= */

[data-bs-theme="dark"] table.dataTable.stripe tbody tr:nth-child(odd) {
    background: rgba(255,255,255,0.02);
}

/* =========================================================
   DATATABLE V2 SEARCH WRAPPER
========================================================= */

.dt-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Label */
[data-bs-theme="dark"] .dt-search label {
    color: rgba(255,255,255,0.8);
    margin-bottom: 0;
}


/* =========================================================
   INPUT STYLE (MATCH FORM-CONTROL)
========================================================= */

.dt-search .dt-input {
    height: 38px;
    padding: 6px 10px;
    border-radius: 8px;
    outline: none;
    transition: all 0.2s ease;
    min-width: 220px;
}


/* DARK MODE (GLASS) */
[data-bs-theme="dark"] .dt-search .dt-input {
    background: rgba(255,255,255,0.08) !important;
    color: #fff !important;
    border: 1px solid rgba(255,255,255,0.2) !important;
    backdrop-filter: blur(6px);
}

/* Placeholder */
[data-bs-theme="dark"] .dt-search .dt-input::placeholder {
    color: rgba(255,255,255,0.6);
}

/* Focus */
[data-bs-theme="dark"] .dt-search .dt-input:focus {
    background: rgba(255,255,255,0.12) !important;
    border-color: #0d6efd !important;
    box-shadow: none !important;
}


/* =========================================================
   LIGHT MODE
========================================================= */

[data-bs-theme="light"] .dt-search .dt-input {
    background: #fff;
    color: #212529;
    border: 1px solid #dee2e6;
}

[data-bs-theme="light"] .dt-search .dt-input:focus {
    border-color: #0d6efd;
}