/* Temporary Bootstrap 4 → 5 utility bridges while views are migrated */
.mr-1 { margin-right: .25rem !important; }
.mr-2 { margin-right: .5rem !important; }
.mr-3 { margin-right: 1rem !important; }
.mr-4 { margin-right: 1.5rem !important; }
.ml-1 { margin-left: .25rem !important; }
.ml-2 { margin-left: .5rem !important; }
.ml-3 { margin-left: 1rem !important; }
.ml-4 { margin-left: 1.5rem !important; }
.ml-auto { margin-left: auto !important; }
.pr-1 { padding-right: .25rem !important; }
.pr-2 { padding-right: .5rem !important; }
.pr-3 { padding-right: 1rem !important; }
.pl-1 { padding-left: .25rem !important; }
.pl-2 { padding-left: .5rem !important; }
.pl-3 { padding-left: 1rem !important; }
.float-right { float: right !important; }
.float-left { float: left !important; }
.font-weight-bold { font-weight: 700 !important; }
.text-right { text-align: right !important; }
.text-left { text-align: left !important; }
.btn-block { display: block; width: 100%; }
.no-gutters { --bs-gutter-x: 0; --bs-gutter-y: 0; }
.custom-control { position: relative; display: block; min-height: 1.5rem; padding-left: 1.5rem; }
.custom-control-input { position: absolute; left: 0; z-index: 1; width: 1rem; height: 1.25rem; opacity: 0; }
.custom-control-label { position: relative; margin-bottom: 0; vertical-align: top; }
.custom-control-label::before,
.custom-control-label::after { position: absolute; content: ""; display: block; }
.custom-checkbox .custom-control-label::before {
	left: -1.5rem; width: 1rem; height: 1rem; pointer-events: none;
	background-color: var(--bs-body-bg); border: 1px solid var(--bs-border-color); border-radius: .25rem;
}
.custom-control-input:checked ~ .custom-control-label::before {
	background-color: var(--bs-primary); border-color: var(--bs-primary);
}
.badge-icon { position: absolute; top: 0; right: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.hidden-sm-down { display: none !important; }
@media (min-width: 576px) { .hidden-sm-down { display: block !important; } }
.hidden-md-down { display: none !important; }
@media (min-width: 768px) { .hidden-md-down { display: block !important; } }
.hidden-lg-up { display: block !important; }
@media (min-width: 992px) { .hidden-lg-up { display: none !important; } }
.hidden-xs-down { display: block !important; }

/* App content spacing under SA5 shell */
.app-content .subheader { margin-bottom: 1rem; }
.app-content .subheader-title { font-size: 1.35rem; margin: 0; }
.app-logo {
	align-items: center;
	gap: .35rem;
}
/* SA5: logo lives in header; keep sidebar logo hidden (avoid duplicate when expanded) */
.app-sidebar .app-logo {
	display: none !important;
}
.app-header .app-logo {
	display: inline-flex !important;
}
.app-logo-img,
.app-logo > img {
	height: 28px !important;
	width: 28px !important;
	min-width: 28px !important;
	max-width: 28px !important;
	object-fit: contain !important;
	flex-shrink: 0;
	visibility: visible !important;
	opacity: 1 !important;
}
.app-logo-text {
	white-space: nowrap;
}
/* Keep logo icon visible when nav is minified; hide text so it fits the narrow strip */
.set-nav-minified .app-logo-text {
	display: none !important;
}
.set-nav-minified .app-header .app-logo {
	justify-content: center;
	padding-left: .5rem;
	padding-right: .5rem;
	overflow: visible;
}
.set-nav-minified .app-header .app-logo-img,
.set-nav-minified .app-header .app-logo > img {
	display: block !important;
}

/* ion.RangeSlider → Ready brand + dark theme */
.irs--flat .irs-bar,
.irs--flat .irs-from,
.irs--flat .irs-to,
.irs--flat .irs-single,
.irs--flat .irs-handle > i:first-child {
	background-color: #F03D1E !important;
}
.irs--flat .irs-from:before,
.irs--flat .irs-to:before,
.irs--flat .irs-single:before {
	border-top-color: #F03D1E !important;
}
.irs--flat .irs-handle.state_hover > i:first-child,
.irs--flat .irs-handle:hover > i:first-child {
	background-color: #c43218 !important;
}
[data-bs-theme=dark] .irs--flat .irs-line {
	background-color: var(--bs-border-color) !important;
}
[data-bs-theme=dark] .irs--flat .irs-grid-pol {
	background-color: var(--bs-border-color) !important;
}
[data-bs-theme=dark] .irs--flat .irs-grid-text {
	color: var(--bs-secondary-color) !important;
}
[data-bs-theme=dark] .irs--flat .irs-min,
[data-bs-theme=dark] .irs--flat .irs-max {
	background-color: var(--bs-secondary-bg) !important;
	color: var(--bs-secondary-color) !important;
}

/* Projelerim: long names must not shove the status badge */
#panelMyProjects [data-template=ProjectName] {
	display: block;
	min-width: 0;
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-size: 0.95rem;
	line-height: 1.35;
}
#panelMyProjects [data-template=ProjectStatus] {
	flex-shrink: 0;
	white-space: nowrap;
}
.login-brand-logo { height: 48px; width: auto; object-fit: contain; }

/* Select2 dark theme (legacy select2.bundle.css is light-only) */
[data-bs-theme=dark] .select2-container--default .select2-selection--single,
[data-bs-theme=dark] .select2-container--default .select2-selection--multiple {
	background-color: var(--bs-body-bg) !important;
	border-color: var(--bs-border-color) !important;
	color: var(--bs-body-color) !important;
}
[data-bs-theme=dark] .select2-container--default .select2-selection--single {
	height: calc(1.5em + .75rem + 2px);
	padding: .2rem .5rem;
}
[data-bs-theme=dark] .select2-container--default .select2-selection--single .select2-selection__rendered {
	color: var(--bs-body-color) !important;
	line-height: 1.8;
}
[data-bs-theme=dark] .select2-container--default .select2-selection--single .select2-selection__placeholder {
	color: var(--bs-secondary-color) !important;
}
[data-bs-theme=dark] .select2-container--default .select2-selection--single .select2-selection__arrow {
	height: 100%;
}
[data-bs-theme=dark] .select2-container--default .select2-selection--single .select2-selection__arrow b {
	border-color: var(--bs-body-color) transparent transparent transparent;
}
[data-bs-theme=dark] .select2-dropdown {
	background-color: var(--bs-body-bg) !important;
	border-color: var(--bs-border-color) !important;
	color: var(--bs-body-color) !important;
}
[data-bs-theme=dark] .select2-container--default .select2-search--dropdown .select2-search__field {
	background-color: var(--bs-body-bg) !important;
	border-color: var(--bs-border-color) !important;
	color: var(--bs-body-color) !important;
}
[data-bs-theme=dark] .select2-container--default .select2-results__option {
	color: var(--bs-body-color);
}
[data-bs-theme=dark] .select2-container--default .select2-results__option--highlighted.select2-results__option--selectable,
[data-bs-theme=dark] .select2-container--default .select2-results__option--highlighted[aria-selected] {
	background-color: var(--bs-primary) !important;
	color: #fff !important;
}
[data-bs-theme=dark] .select2-container--default .select2-results__option[aria-selected=true] {
	background-color: rgba(240, 61, 30, 0.25) !important;
}
[data-bs-theme=dark] .select2-container--default.select2-container--disabled .select2-selection--single {
	background-color: var(--bs-secondary-bg) !important;
}
[data-bs-theme=dark] .select2-container {
	width: 100% !important;
}
/* Task HTML snippets should not force light backgrounds */
[data-bs-theme=dark] [data-template=TaskDescription],
[data-bs-theme=dark] [data-template=TaskDescription] * {
	background-color: transparent !important;
	color: inherit;
}

/* Summernote dark theme + dropdowns inside modals */
[data-bs-theme=dark] .note-editor.note-frame,
[data-bs-theme=dark] .note-editor.note-airframe {
	background-color: var(--bs-body-bg);
	border: 1px solid var(--bs-border-color) !important;
	box-shadow: none !important;
	color: var(--bs-body-color);
}
[data-bs-theme=dark] .note-editor .note-toolbar.card-header,
[data-bs-theme=dark] .card-header.note-toolbar {
	background-color: var(--bs-tertiary-bg, var(--bs-secondary-bg)) !important;
	border: 0 !important;
	border-bottom: 1px solid var(--bs-border-color) !important;
	box-shadow: none !important;
	color: var(--bs-body-color);
}
/* Flatten sunken/inset btn-group look */
[data-bs-theme=dark] .note-toolbar .note-btn-group,
[data-bs-theme=dark] .note-toolbar .btn-group {
	box-shadow: none !important;
	border: 0 !important;
	background: transparent !important;
}
[data-bs-theme=dark] .note-editor.note-frame .note-editing-area .note-editable,
[data-bs-theme=dark] .note-editor.note-airframe .note-editing-area .note-editable,
[data-bs-theme=dark] .note-editor.note-frame.fullscreen .note-editable {
	background-color: var(--bs-body-bg) !important;
	color: var(--bs-body-color) !important;
}
[data-bs-theme=dark] .note-editor .note-statusbar,
[data-bs-theme=dark] .note-editor.note-frame .note-statusbar,
[data-bs-theme=dark] .note-editor.note-airframe .note-statusbar {
	background-color: var(--bs-tertiary-bg, var(--bs-secondary-bg)) !important;
	border-top: 1px solid var(--bs-border-color) !important;
}
[data-bs-theme=dark] .note-editor .note-statusbar .note-resizebar,
[data-bs-theme=dark] .note-editor.note-frame .note-statusbar .note-resizebar {
	background-color: transparent !important;
}
[data-bs-theme=dark] .note-editor .note-statusbar .note-resizebar .note-icon-bar,
[data-bs-theme=dark] .note-editor.note-frame .note-statusbar .note-resizebar .note-icon-bar {
	border-top-color: var(--bs-secondary-color) !important;
	opacity: 0.55;
}
[data-bs-theme=dark] .note-btn.btn-light,
[data-bs-theme=dark] .note-toolbar .btn-light,
[data-bs-theme=dark] .note-toolbar .note-btn {
	background-color: transparent !important;
	border: 1px solid transparent !important;
	box-shadow: none !important;
	color: var(--bs-body-color) !important;
	border-radius: 0.35rem !important;
}
[data-bs-theme=dark] .note-toolbar .note-btn-group > .note-btn + .note-btn,
[data-bs-theme=dark] .note-toolbar .btn-group > .note-btn + .note-btn {
	margin-left: 0.15rem;
}
[data-bs-theme=dark] .note-btn.btn-light:hover,
[data-bs-theme=dark] .note-toolbar .note-btn:hover,
[data-bs-theme=dark] .note-btn.btn-light.active,
[data-bs-theme=dark] .note-toolbar .note-btn.active,
[data-bs-theme=dark] .note-toolbar .note-btn.show {
	background-color: rgba(240, 61, 30, 0.18) !important;
	border-color: transparent !important;
	box-shadow: none !important;
	color: var(--bs-body-color) !important;
}
[data-bs-theme=dark] .note-dropdown-menu,
[data-bs-theme=dark] .note-toolbar .dropdown-menu {
	background-color: var(--bs-body-bg) !important;
	border-color: var(--bs-border-color) !important;
	color: var(--bs-body-color) !important;
}
[data-bs-theme=dark] .note-dropdown-menu .dropdown-item,
[data-bs-theme=dark] .note-toolbar .dropdown-menu .dropdown-item,
[data-bs-theme=dark] .note-dropdown-menu .dropdown-item span,
[data-bs-theme=dark] .note-toolbar .dropdown-menu .dropdown-item span,
[data-bs-theme=dark] .note-toolbar .note-current-fontname,
[data-bs-theme=dark] .note-toolbar .note-current-fontsize,
[data-bs-theme=dark] .dropdown-fontname .dropdown-item,
[data-bs-theme=dark] .dropdown-fontname .dropdown-item * {
	color: #e8eaed !important;
}
[data-bs-theme=dark] .note-dropdown-menu .dropdown-item:hover,
[data-bs-theme=dark] .note-toolbar .dropdown-menu .dropdown-item:hover,
[data-bs-theme=dark] .note-dropdown-menu .dropdown-item:hover span,
[data-bs-theme=dark] .dropdown-fontname .dropdown-item:hover,
[data-bs-theme=dark] .dropdown-fontname .dropdown-item:hover * {
	background-color: rgba(240, 61, 30, 0.2) !important;
	color: #fff !important;
}
/* Color palette action buttons (Transparent / Select / Reset) */
[data-bs-theme=dark] .note-color-reset,
[data-bs-theme=dark] .note-color-select,
[data-bs-theme=dark] .note-palette .btn-light {
	background-color: var(--bs-secondary-bg) !important;
	border-color: var(--bs-border-color) !important;
	color: #e8eaed !important;
}
[data-bs-theme=dark] .note-palette-title {
	color: var(--bs-secondary-color) !important;
}
[data-bs-theme=dark] .note-dropdown-menu.note-check .dropdown-item i {
	color: #e8eaed !important;
}
[data-bs-theme=dark] .note-modal .modal-content {
	background-color: var(--bs-body-bg);
	color: var(--bs-body-color);
}
/* Keep toolbar dropdowns visible above modal clipping */
.modal .note-editor,
.modal .note-toolbar,
.modal .note-btn-group {
	overflow: visible !important;
}
.modal .note-dropdown-menu.dropdown-menu {
	z-index: 1080;
}
[data-bs-theme=dark] .btn-close {
	filter: invert(1) grayscale(100%) brightness(200%);
}

/* Leftover light surfaces from SA4 markup */
[data-bs-theme=dark] .bg-white,
[data-bs-theme=dark] .card-header.bg-white {
	background-color: var(--bs-body-bg) !important;
	color: var(--bs-body-color) !important;
}
[data-bs-theme=dark] .bg-faded {
	background-color: var(--bs-tertiary-bg, var(--bs-secondary-bg)) !important;
}
[data-bs-theme=dark] .nav-pills .nav-link {
	color: var(--bs-secondary-color);
}
[data-bs-theme=dark] .nav-pills .nav-link.active,
[data-bs-theme=dark] .nav-pills .show > .nav-link {
	background-color: var(--bs-primary);
	color: #fff;
}

/* Soften Google reCAPTCHA chrome on dark auth cards (iframe content is not stylable) */
.recaptcha-blend {
	display: inline-block;
	line-height: 0;
	overflow: hidden;
	border-radius: 8px;
	border: 1px solid rgba(255, 255, 255, 0.08);
	background: rgba(22, 22, 22, 0.95);
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.45);
}
.recaptcha-blend .g-recaptcha {
	/* Pull iframe slightly so Google's light outer rim gets clipped */
	margin: -2px;
	filter: brightness(0.92) contrast(0.96) saturate(0.9);
}
.recaptcha-blend iframe {
	border: 0 !important;
}
