.livewire-loading {
    height: 100%;
    width: 100%;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
}

.livewire-loading span {
    width: 30px;
    height: 30px;
    border: 4px solid #60a5fa;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.submenu_tree {
    float: right;
    margin-left: 0;
    margin-right: 8px;
    margin-top: -39px;
}

/* Overall progress bar container */
.progress-line {
    display: flex;
    width: 100%;
    height: 10px;
    position: relative;
    background-color: #dee1e6;
    border-radius: 5px;
    overflow: hidden;
}

/* Section colors */
.first-x {
    position: relative;
    background-color: #f1c40f;
    /* Yellow */
}

.trail_line {
    position: absolute;
    width: 1px;
    background-color: #999;
    border-radius: 5px;
    height: 100%;
}

.middle-duration {
    background-color: #3498db;
    /* Blue */
}

.last-y {
    background-color: #e74c3c;
    /* Red */
}

/* Labels for dates */

.tail_period {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: #6c757d;
    font-weight: 500;
}

/* The container */
/* .container-checkbox {
    display: block;
    position: relative;
    padding-right: 35px;
    margin-bottom: 12px;
    cursor: pointer;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.container-checkbox input {
    position: absolute;
    opacity: 1;
    cursor: pointer;
}

.container-checkbox .checkmark {
    position: absolute;
    top: 50%;
    right: 10px;
    width: 18px;
    background-color: #3874ff;
    width: 1em;
    height: 1em;
    border-radius: .25em;
    transform: translateY(-72%);
}



.container-checkbox .checkmark {
    background-color: #3874ff;
}

.container-checkbox .checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.container-checkbox .checkmark:after {
    display: block;
}

.container-checkbox .checkmark:after {
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 3px 3px 0;
    -webkit-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    transform: rotate(45deg);
}


.container-radio {
    display: block;
    position: relative;
    padding-left: 35px;
    margin-bottom: 12px;
    cursor: pointer;
    font-size: 22px;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.container-radio input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.container-radio .checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 25px;
    width: 25px;
    background-color: #eee;
    border-radius: 50%;
}

.container-radio:hover input ~ .checkmark {
    background-color: #ccc;
}

.container-radio input:checked ~ .checkmark {
    background-color: #2196F3;
}

.container-radio .checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.container-radio input:checked ~ .checkmark:after {
    display: block;
}

.container-radio .checkmark:after {
 	top: 9px;
	left: 9px;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: white;
} */

.anchorjs-link {
    display: none;
}

.secoundrow {
    cursor: pointer;
}

.timeline-vertical .timeline-item:not(:last-child) .timeline-item-bar .timeline-bar {
    right: 20px;
    top: 30px;
    z-index: -1;
}

.timeline-vertical .timeline-item:last-child .timeline-item-bar .timeline-bar {
    display: none;
}

.menuu.show {
    transform: translate(74px, 150px) !important;
}

.flatpickr-months .flatpickr-month .flatpickr-current-month {
    justify-content: start;
    font-size: 20px;
    padding: 10px;
}

.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
    width: 10px;
}

.flatpickr-months .flatpickr-prev-month.flatpickr-next-month,
.flatpickr-months .flatpickr-next-month.flatpickr-next-month {
    right: 10px !important;
    left: auto !important;
}

.flatpickr-months .flatpickr-prev-month.flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month.flatpickr-prev-month {
    left: auto;
}

.flatpickr-calendar {
    width: revert-layer !important;
}

.btn-warning-2 {
    background-color: #ffc107;
    border-color: #ffc107;
}

.btn-danger {
    background-color: #ed2000 !important;
    border-color: #ed2000;
}

.btn {
    width: auto;
}

.nav-link,
a.dropdown-item {
    cursor: pointer;
}

.alert-warning {
    color: #664d03;
    background-color: #fff3cd;
    border-color: #ffecb5;
}

/* @media(min-width: 992px){
    .navbar-vertical.navbar-expand-lg{
        width: 18.875rem;
    }
} */

@media print {
    .btn {
        display: none !important;
    }

    .no-print {
        display: none !important;
    }
}

.nav-scroll-container {
    overflow-x: visible;
}

@media (max-width: 767.98px) {
    .nav-scroll-container {
        overflow-x: scroll !important;
    }
}

/* جعل SlimSelect بنفس ارتفاع Bootstrap */

/* السهم ليبدو مثل Bootstrap */

/* القوائم المنسدلة */
/* SlimSelect container */
/* .ss-main {
    width: 100%;
    min-width: 150px;
    padding: 6px 10px;
    font-size: 14px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    text-align: right;
} */

/* إعادة تصميم SlimSelect ليشبه Bootstrap */
.ss-main {
    width: 100% !important;
    padding: 0.25rem 0.5rem !important;
    font-size: 0.875rem !important;
    border: 1px solid #ced4da !important;
    border-radius: 0.25rem !important;
    background-color: #fff !important;
    display: flex;
    align-items: center;
    text-align: right;
    direction: rtl;
}

/* إزالة السهم الخاص بـ SlimSelect */
.ss-main .ss-arrow {
    display: none !important;
}

/* التحكم في القائمة المنسدلة */
.ss-content {
    font-size: 0.875rem !important;
    border-radius: 0.25rem !important;
    text-align: right !important;
    width: auto !important;
    /* مهم جداً ليتطابق مع العمود */
    min-width: unset !important;
    max-width: unset !important;
}

/* ضبط البحث في القائمة */
.ss-search input {
    font-size: 0.875rem;
    text-align: right;
}

.ss-content.ss-open-below {
    margin-top: -33px !important;
}

.ss-content.ss-open-above {
    margin-top: -363px !important;
}

.ss-search {
    text-align: right;
}

.navbar-vertical .navbar-vertical-content .navbar-nav .nav .nav-link {
    padding-left: -20px !important;
}

/* Details pages */
.bg-primary-box {
    background: #00114f;
}

.bg-primary-box-stable {
    border: 1px solid #00114f;
}

.text-primary-box {
    color: #00114f;
}

.title-box {
    color: #3874ff;
}

/* ===== Card wrapper like dribbble ===== */
.tree-card {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
}

.tree-header {
    padding: 16px 18px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    background: radial-gradient(600px 200px at 10% 0%,
            rgba(13, 110, 253, 0.14),
            transparent 60%),
        linear-gradient(90deg, rgba(13, 110, 253, 0.06), transparent);
}

.tree-body {
    padding: 14px 14px 18px 14px;
}

.tree {
    margin: 0;
    padding: 0;
    list-style: none;
}

.tree-node {
    position: relative;
    margin: 10px 0;
}

/* ===== Node card ===== */
.tree-details {
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02);
    transition: box-shadow 0.15s ease, border-color 0.15s ease,
        transform 0.15s ease;
}

.tree-details:hover {
    border-color: rgba(13, 110, 253, 0.2);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

details {
    display: block;
}

summary {
    list-style: none;
}

summary::-webkit-details-marker {
    display: none;
}

.tree-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    cursor: pointer;
    user-select: none;
}

/* caret button */
.tree-caret {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(0, 0, 0, 0.02);
    display: grid;
    place-items: center;
    flex: 0 0 auto;
}

.tree-caret i {
    transition: transform 0.15s ease;
    opacity: 0.75;
}

details[open] .tree-caret {
    background: rgba(13, 110, 253, 0.1);
    border-color: rgba(13, 110, 253, 0.2);
}

details[open] .tree-caret i {
    transform: rotate(90deg);
    opacity: 1;
}

/* icon bubble */
.tree-icon {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    background: rgba(13, 110, 253, 0.1);
    color: #0d6efd;
}

.tree-leaf .tree-icon {
    background: rgba(108, 117, 125, 0.12);
    color: #6c757d;
}

.tree-text {
    min-width: 0;
    flex: 1 1 auto;
}

.tree-text .main {
    font-weight: 700;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tree-text .sub {
    font-size: 0.82rem;
    line-height: 1.2;
    margin-top: 2px;
}

.tree-summary .badge {
    font-weight: 700;
    padding: 0.45rem 0.6rem;
    border-radius: 999px;
}

/* ===== Children area like lines in design ===== */
.tree-children {
    margin: 0;
    padding: 10px 12px 12px 34px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    position: relative;
}

.tree-children::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 14px;
    left: 18px;
    width: 2px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 2px;
}

.tree-children>.tree-node {
    position: relative;
}

.tree-children>.tree-node::before {
    content: "";
    position: absolute;
    top: 28px;
    left: 18px;
    width: 18px;
    height: 2px;
    background: rgba(0, 0, 0, 0.08);
}

/* ===== RTL ===== */
html[dir="rtl"] .tree-children {
    padding-right: 34px;
    padding-left: 12px;
    /* keep inner padding */
}

html[dir="rtl"] .tree-children::before {
    left: auto;
    right: 18px;
}

html[dir="rtl"] .tree-children>.tree-node::before {
    left: auto;
    right: 18px;
}



.form-field {
    padding-inline: 6px;
    margin-bottom: 6px;
}

.form-field__label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: #6b7280;
    margin-bottom: 6px;
    margin-bottom: 6px;
    line-height: 1.2;
}

.form-field__required {
    color: #dc2626;
    font-size: 13px;
    line-height: 1;
}

.form-field__error {
    margin-top: 4px;
    font-size: 12px;
    font-weight: 500;
    color: #dc2626;
    line-height: 1.3;
}

.soft-control {
    min-height: 42px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    padding: 0.65rem 0.85rem;
    font-size: 14px;
    box-shadow: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.soft-control:focus {
    border-color: #a5b4fc;
    box-shadow: 0 0 0 0.18rem rgba(99, 102, 241, 0.12);
    background: #fff;
}

textarea.soft-control,
textarea.form-control.soft-control {
    min-height: 96px;
    resize: vertical;
}

.soft-input-group .form-control {
    min-height: 42px;
    border-radius: 12px;
    box-shadow: none;
}

.soft-input-group .input-group-text {
    border: 1px solid #e5e7eb;
    background: #f8fafc;
    color: #6b7280;
    border-radius: 12px;
    font-size: 13px;
}

.soft-input-group .form-control:not(:first-child),
.soft-input-group .form-select:not(:first-child) {
    border-start-start-radius: 12px;
    border-end-start-radius: 12px;
}

.soft-input-group .form-control:not(:last-child),
.soft-input-group .form-select:not(:last-child) {
    border-start-end-radius: 12px;
    border-end-end-radius: 12px;
}



.btn-save-modal,
.spinner-border .spinner-border-sm {
    background: #0f172a !important;
    color: #fff !important;
    border-color: #0f172a   !important;
    min-width: 100px    !important;
}

.btn-save-modal:hover {
    background: #1e293b !important;
    border-color: #1e293b !important;
}

.btn-save-modal:focus {
    background: #1e293b !important;
    border-color: #1e293b !important;
}