.tree li,
.tree ul {
    position: relative;
    transition: .5s
}

.pull-right {
    float: right
}

.pull-left,
.tree li {
    float: left
}

.btn-block {
    width: 100%
}

.btn-div {
    margin-top: 11%
}

.modal-left-side,
.modal-right-side {
    min-height: 100%;
    margin: 0 !important;
    display: flex;
    width: 100%;
    position: absolute;
    top: 0
}

.modal-left-side {
    left: 0
}

.modal-left-side .modal-content {
    border-width: 0;
    border-radius: 0
}

.modal.fade .modal-left-side {
    transform: translate(-100px, 0)
}

.modal-right-side {
    right: 0
}

.modal-right-side .modal-content {
    border-width: 0;
    border-radius: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden
}

.modal-right-side .modal-body {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
    overscroll-behavior: auto;
    -webkit-overflow-scrolling: touch;
}

@media (min-width: 768px) {
    .modal-right-side.modal-lg {
        width: 850px;
        max-width: 850px;
    }
    .modal-right-side.modal-xl {
        width: 1100px;
        max-width: 1100px;
    }
}

.modal-table-wrap {
    overflow-x: auto;
    overflow-y: visible;
}

@media (min-width: 768px) {
    .modal-table-wrap {
        overflow: visible;
    }
}

.modal-right-side form {
    height: auto;
    overflow: visible
}

/* ── Resize handle — drag left edge to widen the modal (desktop only) ── */
.modal-resize-handle {
    position: absolute;
    left: 0;
    top: 0;
    width: 14px;
    height: 100%;
    cursor: ew-resize;
    z-index: 10;
    background: transparent;
    transition: background .15s
}

.modal-resize-handle:hover,
.modal-resize-handle.dragging {
    background: rgba(102, 144, 244, .12)
}

/* Grip indicator — 3-dot vertical pill centred on the handle */
.modal-resize-handle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 4px;
    height: 40px;
    border-radius: 4px;
    background: repeating-linear-gradient(
        to bottom,
        #b0bec5 0px,
        #b0bec5 4px,
        transparent 4px,
        transparent 8px
    );
    opacity: .55;
    transition: opacity .15s, background .15s
}

.modal-resize-handle:hover::after,
.modal-resize-handle.dragging::after {
    opacity: 1;
    background: repeating-linear-gradient(
        to bottom,
        #6690f4 0px,
        #6690f4 4px,
        transparent 4px,
        transparent 8px
    )
}

@media (max-width: 991px) {
    .modal-resize-handle { display: none }
}

@media all and (-ms-high-contrast:none),
(-ms-high-contrast:active) {

    .modal-left-side .modal-content,
    .modal-right-side .modal-content {
        min-height: 100vh
    }
}

.modal.fade .modal-right-side {
    transform: translate(0, 0)
}

@media (min-width:576px) {
    .modal-left-side:not(.modal-lg):not(.modal-xl) .modal-content {
        border-width: 0 1px 0 0
    }

    .modal-right-side:not(.modal-lg):not(.modal-xl) .modal-content {
        border-width: 0 0 0 1px
    }
}

@media (min-width:992px) {
    .modal-lg.modal-left-side .modal-content {
        border-width: 0 1px 0 0
    }

    .modal-lg.modal-right-side .modal-content {
        border-width: 0 0 0 1px
    }
}

@media (min-width:1200px) {
    .modal-xl.modal-left-side .modal-content {
        border-width: 0 1px 0 0
    }

    .modal-xl.modal-right-side .modal-content {
        border-width: 0 0 0 1px
    }
}

.tree li::after,
.tree ul ul::before {
    left: 50%;
    border-left: 2px solid #a2d5c6
}

.universal-loader-wrap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, .8);
    z-index: 9999;
    pointer-events: none;
    transition: opacity .5s ease-out;
    opacity: 1
}

.universal-loader-wrap.fade-out {
    opacity: 0
}

.universal-loader {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 6px solid rgba(102, 144, 244, .2);
    border-top-color: #6690f4;
    animation: 1s linear infinite spin
}

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

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

.tab-p {
    padding: 10px 0 !important
}

.mm-inner-icon i {
    font-size: 14px !important
}

.clear-cache-div {
    width: auto;
    height: auto;
    display: flex;
    justify-content: center;
    align-items: center
}

.editable-input {
    width: 85%
}

.edit-pen {
    cursor: pointer
}

.select2-container--open,
.select2-container--open .select2-dropdown,
.select2-dropdown,
.select2-container--default .select2-search--dropdown .select2-search__field {
    z-index: 9999999 !important;
}

.ui-sortable-handle {
    width: 100% !important
}

.vertical-collpsed .logo span.logo-sm {
    margin-left: -20px !important
}

.select2-container--bootstrap-5 .select2-selection--single {
    height: calc(1.5em + .75rem + 2px);
    padding: .375rem .75rem;
    display: flex !important;
    align-items: center !important
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
    line-height: inherit;
    padding-left: 0 !important
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: .75rem
}

.select2-container--bootstrap-5 .select2-selection--multiple {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: .2rem .4rem;
    min-height: calc(1.5em + .94rem + 2px)
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice {
    display: flex;
    align-items: center;
    background-color: #e9ecef;
    color: #495057;
    border: 1px solid #ced4da;
    border-radius: .47rem;
    padding: 2px 8px;
    margin: 2px;
    font-size: .875rem
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice__remove {
    order: 2;
    margin-left: 8px;
    color: #6c757d;
    font-size: 1.1em;
    font-weight: 700;
    transition: color .2s
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice__remove:hover {
    color: #dc3545
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-search__field {
    border: 0;
    outline: 0;
    margin: 2px;
    padding: 0;
    width: 100%;
    flex-grow: 1
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-search__field::placeholder {
    color: #6c757d
}

.modal {
    z-index: 100000
}

.swal2-container {
    z-index: 10000000000001 !important
}

#structure-chart-container .tree {
    width: 100%;
    overflow-x: auto;
    padding: 20px
}

.tree ul {
    padding-top: 20px;
    display: flex;
    justify-content: center
}

.tree li {
    text-align: center;
    list-style-type: none;
    padding: 20px 5px 0
}

.tree li::after,
.tree li::before {
    content: '';
    position: absolute;
    top: 0;
    right: 50%;
    border-top: 2px solid #a2d5c6;
    width: 50%;
    height: 20px
}

.tree li::after {
    right: auto
}

.tree li:only-child::after,
.tree li:only-child::before {
    display: none
}

.tree li:only-child {
    padding-top: 0
}

.tree li:first-child::before,
.tree li:last-child::after {
    border: 0
}

.tree li:last-child::before {
    border-right: 2px solid #a2d5c6;
    border-radius: 0 5px 0 0
}

.tree li:first-child::after {
    border-radius: 5px 0 0
}

.tree ul ul::before {
    content: '';
    position: absolute;
    top: 0;
    width: 0;
    height: 20px
}

.tree li a.node {
    padding: 15px 25px;
    text-decoration: none;
    color: #333;
    background-color: #e0f2f1;
    border: 1px solid #a2d5c6;
    font-size: 14px;
    display: inline-block;
    border-radius: 8px;
    transition: .3s;
    min-width: 150px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, .1)
}

.tree li a.node:hover {
    background: #a2d5c6;
    color: #fff;
    transform: translateY(-2px)
}

.node-title {
    font-weight: 600
}

.node-type {
    font-size: 12px;
    color: #00796b;
    margin-top: 5px;
    text-transform: uppercase
}

.actions.text-center {
    display: flex
}

.actions.text-center a {
    margin: 0 3px
}

.select2-results__options {
    max-height: 250px;
    overflow-y: auto
}

ul.dropdown-menu.dropdown-menu-end.show {
    z-index: 100000
}

.nav.nav-tabs .nav-item {
    width: 25%;
    min-width: 25%;
    border-bottom: 1px solid #333
}

#cerate-modal .tab-pane {
    padding: 0 20px
}

@media (min-width: 992px) {
    body:not(.vertical-collpsed) .navbar-brand-box,
    body:not(.vertical-collpsed) .vertical-menu {
        width: 280px;
        z-index: 1001;
    }

    body:not(.vertical-collpsed) .main-content {
        margin-left: 280px;
    }
}

.flatpickr-wrapper {
    display: block;
    width: 100%;
    position: relative;
    z-index: 100000;
}

/* Ensure right-aligned inputs or inputs near the right edge keep flatpickr inside the viewport / modal */
.col-md-6:last-child .flatpickr-wrapper .flatpickr-calendar,
.col-md-6:nth-child(even) .flatpickr-wrapper .flatpickr-calendar,
.col-6:last-child .flatpickr-wrapper .flatpickr-calendar,
.col-lg-6:last-child .flatpickr-wrapper .flatpickr-calendar,
.col-xl-6:last-child .flatpickr-wrapper .flatpickr-calendar,
.modal-body .row > div:last-child .flatpickr-wrapper .flatpickr-calendar,
.flatpickr-wrapper:has(#end_date) .flatpickr-calendar,
.flatpickr-wrapper:has(.flatpickr-right) .flatpickr-calendar,
#end_date ~ .flatpickr-calendar,
.flatpickr-right ~ .flatpickr-calendar,
.flatpickr-calendar.right-align {
    left: auto !important;
    right: 0 !important;
}

.col-md-6:last-child .flatpickr-wrapper .flatpickr-calendar::before,
.col-md-6:last-child .flatpickr-wrapper .flatpickr-calendar::after,
.col-md-6:nth-child(even) .flatpickr-wrapper .flatpickr-calendar::before,
.col-md-6:nth-child(even) .flatpickr-wrapper .flatpickr-calendar::after,
.col-6:last-child .flatpickr-wrapper .flatpickr-calendar::before,
.col-6:last-child .flatpickr-wrapper .flatpickr-calendar::after,
.flatpickr-wrapper:has(#end_date) .flatpickr-calendar::before,
.flatpickr-wrapper:has(#end_date) .flatpickr-calendar::after,
.flatpickr-wrapper:has(.flatpickr-right) .flatpickr-calendar::before,
.flatpickr-wrapper:has(.flatpickr-right) .flatpickr-calendar::after,
#end_date ~ .flatpickr-calendar::before,
#end_date ~ .flatpickr-calendar::after,
.flatpickr-right ~ .flatpickr-calendar::before,
.flatpickr-right ~ .flatpickr-calendar::after,
.flatpickr-calendar.right-align::before,
.flatpickr-calendar.right-align::after {
    left: auto !important;
    right: 22px !important;
}

.vertical-menu {
    z-index: 20000 !important;
}

.navbar-brand-box {
    z-index: 20001 !important;
}

/* Fixed Header & Notification Dropdown Z-Index */
#page-topbar {
    z-index: 20005 !important;
}

#page-topbar.topbar-elevated,
#page-topbar:has(#page-header-notifications-dropdown[aria-expanded="true"]),
#page-topbar:has(.notification-dropdown-menu.show) {
    z-index: 99999 !important;
}

.notification-dropdown-menu,
.dropdown-menu[aria-labelledby="page-header-notifications-dropdown"] {
    width: 380px !important;
    min-width: 360px !important;
    max-width: 95vw !important;
    border-radius: 12px !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.16), 0 4px 12px rgba(0, 0, 0, 0.06) !important;
    z-index: 99999 !important;
    overflow: hidden !important;
}

/* Notification Item & Non-Squish Icon */
.notification-item {
    border-bottom: 1px solid #f1f3f6 !important;
    transition: background-color 0.15s ease-in-out !important;
    text-decoration: none !important;
    display: block !important;
}
.notification-item:last-child {
    border-bottom: none !important;
}
.notification-item:hover {
    background-color: #f8fafd !important;
}
.notification-item.unread-item {
    background-color: #f2f6fc !important;
}
.notification-item.unread-item:hover {
    background-color: #e9f0fa !important;
}

.notification-item .avatar-xs {
    flex: 0 0 38px !important;
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
    max-width: 38px !important;
    max-height: 38px !important;
    flex-shrink: 0 !important;
}

.notification-item .avatar-title {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    font-size: 18px !important;
    line-height: 1 !important;
}

.notification-item .flex-grow-1 {
    min-width: 0 !important;
}

/* Profile Image Hover & Camera Overlay */
.profile-image-container {
    overflow: hidden;
}
.profile-image-container:hover .profile-image-overlay {
    opacity: 1 !important;
}

/* ==========================================================================
   Global DataTable Standards: Wrap, word-break break-all & balanced column sizing
   ========================================================================== */
table.dataTable {
    width: 100% !important;
}

table tbody td,
.table tbody td,
table.dataTable tbody td {
    text-wrap: wrap !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
    white-space: normal !important;
    vertical-align: middle !important;
}

table tbody td:not(.actions-column):not(.col-checkbox):not(.no-wrap):not(.text-nowrap) *:not(.btn):not(.btn *):not(.badge):not(.badge *):not(.fa):not(.fas):not(.far):not(i),
table.dataTable tbody td:not(.actions-column):not(.col-checkbox):not(.no-wrap):not(.text-nowrap) *:not(.btn):not(.btn *):not(.badge):not(.badge *):not(.fa):not(.fas):not(.far):not(i) {
    word-break: break-word;
    overflow-wrap: anywhere;
}

table.dataTable thead th {
    font-size: 13px;
    font-weight: 600;
}

table.dataTable thead th:first-child,
table.dataTable tbody td:first-child,
table.dataTable thead th.no-colvis {
    min-width: 45px !important;
    width: 45px !important;
    max-width: 50px !important;
    text-align: center;
}

table.dataTable thead th:last-child,
table.dataTable tbody td:last-child {
    min-width: 160px;
}

table.dataTable .badge,
.table .badge {
    white-space: nowrap !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
    max-width: 100% !important;
    display: inline-flex !important;
    align-items: center !important;
}

table.dataTable .badge.badge-wrap,
.table .badge.badge-wrap {
    white-space: normal !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
}

/* Employee Datatable Name Column Styling */
.employee-name-cell {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
    min-height: 24px !important;
}

.employee-name-cell .employee-name {
    font-weight: 600 !important;
    color: #212529 !important;
    font-size: 13.5px !important;
    line-height: 1.4 !important;
}

.employee-name-cell .badge {
    font-size: 10.5px !important;
    font-weight: 600 !important;
    padding: 3px 7px !important;
    line-height: 1.2 !important;
    border-radius: 4px !important;
    white-space: nowrap !important;
    letter-spacing: 0.2px !important;
}

/* ====================================================
   International Telephone Input (intl-tel-input)
   ==================================================== */
.iti {
    width: 100% !important;
    display: block !important;
}

.iti input.form-control,
.iti input.phone-input,
.iti input[type="tel"],
.iti__tel-input {
    width: 100% !important;
    display: block !important;
}

.iti__country-container {
    z-index: 5;
}

.iti__selected-country {
    height: 100%;
}

.iti__selected-dial-code {
    font-weight: 500;
    font-size: 13px;
    color: #495057;
    margin-left: 4px;
}

.iti__dropdown-content,
.iti__country-list,
.iti--detached-country-selector {
    z-index: 99999 !important;
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15) !important;
    border: 1px solid #ced4da;
    background-color: #ffffff;
}

.iti__search-input {
    padding: 8px 12px !important;
    font-size: 13px !important;
    border: 1px solid #ced4da !important;
    border-radius: 4px !important;
}

.iti__search-input:focus {
    border-color: #556ee6 !important;
    outline: none !important;
}

.iti__country {
    padding: 8px 12px;
    font-size: 13px;
    transition: background-color 0.1s ease;
}

.iti__country-name {
    margin-right: 6px;
    color: #343a40;
}

.iti__dial-code {
    color: #74788d;
    font-size: 12px;
}

/* ==========================================================================
   DATATABLE COMPACT LAYOUT & COLUMN DENSITY FIXES (Students & Parents)
   ========================================================================== */

/* 1. Xana padding-lərinin sıxlaşdırılması (Density / Compact Mode) */
.students-table th,
.parents-table th {
    padding: 6px 8px !important;
    vertical-align: middle !important;
    font-size: 12.5px !important;
    line-height: 1.35 !important;
    white-space: nowrap !important;
    font-weight: 600 !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
}

.students-table td,
.parents-table td {
    padding: 6px 8px !important;
    vertical-align: middle !important;
    font-size: 12.5px !important;
    line-height: 1.35 !important;
    white-space: normal !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
}

/* Checkbox və Sıra sütunlarında sorting oxlarını tamamilə ləğv et */
table.dataTable thead th.col-checkbox::before,
table.dataTable thead th.col-checkbox::after,
table.dataTable thead th.col-order_number::before,
table.dataTable thead th.col-order_number::after,
table.dataTable thead th.col-order::before,
table.dataTable thead th.col-order::after,
table.dataTable thead th.no-colvis::before,
table.dataTable thead th.no-colvis::after,
table.dataTable thead th.no-sort::before,
table.dataTable thead th.no-sort::after,
table.dataTable thead th:has(.bulk-delete-select-all)::before,
table.dataTable thead th:has(.bulk-delete-select-all)::after,
table.dataTable thead th:has(input[type="checkbox"])::before,
table.dataTable thead th:has(input[type="checkbox"])::after {
    display: none !important;
    content: "" !important;
}

/* Datatable ümumi layout */
table.dataTable {
    table-layout: fixed !important;
}

/* 2. Sütunların ölçüləri və xüsusi nizamlamaları */

/* Checkbox */
table.dataTable thead th.col-checkbox,
table.dataTable tbody td.col-checkbox,
table.dataTable thead th.no-colvis,
table.dataTable tbody td.no-colvis,
table.dataTable thead th:has(.bulk-delete-select-all),
table.dataTable tbody td:has(.bulk-delete-checkbox),
table.dataTable thead th:has(input[type="checkbox"]),
table.dataTable tbody td:has(input[type="checkbox"]) {
    width: 36px !important;
    min-width: 36px !important;
    max-width: 38px !important;
    padding: 4px 2px !important;
    padding-right: 2px !important;
    padding-left: 2px !important;
    text-align: center !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
}

.form-check {
    padding-left: 0 !important;
}

table.dataTable thead th.col-checkbox input,
table.dataTable tbody td.col-checkbox input,
table.dataTable thead th:has(.bulk-delete-select-all) input,
table.dataTable tbody td:has(.bulk-delete-checkbox) input,
table.dataTable thead th:has(input[type="checkbox"]) input,
table.dataTable tbody td:has(input[type="checkbox"]) input,
table.dataTable .form-check-input {
    margin: 0 auto !important;
    padding: 0 !important;
    cursor: pointer;
    width: 14px !important;
    height: 14px !important;
    display: block !important;
}

/* Sıra No */
table.dataTable thead th.col-order_number,
table.dataTable tbody td.col-order_number,
table.dataTable thead th.col-order,
table.dataTable tbody td.col-order,
table.dataTable thead tr:has(th:has(input[type="checkbox"])) th:nth-child(2),
table.dataTable tbody tr:has(td:has(input[type="checkbox"])) td:nth-child(2) {
    width: 48px !important;
    min-width: 45px !important;
    max-width: 52px !important;
    text-align: center !important;
    white-space: nowrap !important;
    padding: 4px 2px !important;
    padding-right: 2px !important;
    padding-left: 2px !important;
    font-size: 12px !important;
    box-sizing: border-box !important;
}

/* FİN Kod */
.students-table th.col-profile__fin_code,
.students-table td.col-profile__fin_code,
.students-table th.col-fin,
.students-table td.col-fin {
    width: 80px !important;
    max-width: 85px !important;
    text-align: center !important;
    white-space: normal !important;
    word-break: break-all !important;
    overflow-wrap: anywhere !important;
    font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !important;
    font-weight: 600 !important;
    font-size: 12px !important;
}

.parents-table th.col-profile__fin_code,
.parents-table td.col-profile__fin_code,
.parents-table th.col-fin,
.parents-table td.col-fin {
    width: 80px !important;
    max-width: 85px !important;
    text-align: center !important;
    white-space: nowrap !important;
    font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !important;
    font-weight: 600 !important;
    font-size: 12px !important;
}

/* Şagird Kodu / Nömrəsi */
.students-table th.col-code,
.students-table td.col-code {
    width: 95px !important;
    min-width: 85px !important;
    max-width: 105px !important;
    white-space: normal !important;
    word-break: break-all !important;
    overflow-wrap: anywhere !important;
    font-size: 11px !important;
    text-align: center !important;
}

.students-table th.col-code *,
.students-table td.col-code * {
    white-space: normal !important;
    word-break: break-all !important;
    overflow-wrap: anywhere !important;
}

/* Valideyn Kodu (İDR-BAK-PARENT-XXXXXX 21 simvoldur, eni 175px) */
.parents-table th.col-code,
.parents-table td.col-code,
.parents-table th.col-parent-code,
.parents-table td.col-parent-code {
    width: 175px !important;
    min-width: 170px !important;
    max-width: 185px !important;
    white-space: nowrap !important;
    font-size: 11.5px !important;
    text-align: center !important;
}

.parents-table th.col-profile__serial_type,
.parents-table td.col-profile__serial_type {
    width: 90px !important;
    min-width: 85px !important;
    text-align: center !important;
    white-space: nowrap !important;
}

.parents-table th.col-profile__serial_number,
.parents-table td.col-profile__serial_number {
    width: 105px !important;
    min-width: 100px !important;
    text-align: center !important;
    white-space: nowrap !important;
}

/* Valideynlər Cədvəlinin Minimal Eni — Sütunların sıxılıb bir-birinin üstünə çıxmaması üçün */
table.dataTable.parents-table {
    min-width: 1220px !important;
}

/* Sinif */
.students-table th.col-class_name,
.students-table td.col-class_name,
.students-table th.col-class,
.students-table td.col-class {
    width: 60px !important;
    max-width: 85px !important;
    text-align: center !important;
    white-space: nowrap !important;
    padding: 4px 6px !important;
}

.students-table td.col-class_name .badge,
.students-table td.col-class .badge {
    white-space: nowrap !important;
    padding: 3px 6px !important;
    font-size: 11px !important;
}

/* Status (Aktiv şagird və s. - Qətiyyən sıxılıb itməsin) */
.students-table th.col-status,
.students-table td.col-status {
    width: 95px !important;
    min-width: 85px !important;
    white-space: nowrap !important;
    text-align: center !important;
    padding: 4px 6px !important;
}

.students-table td.col-status .badge {
    white-space: nowrap !important;
    padding: 4px 8px !important;
    font-size: 11px !important;
    display: inline-block !important;
}

/* Elektron poçt (kəsilmədən aşağı düşməsi üçün) */
.students-table td.col-email,
.students-table td.email-col {
    font-size: 11.5px !important;
    max-width: 170px !important;
    white-space: normal !important;
    word-break: break-all !important;
    overflow-wrap: anywhere !important;
    overflow: visible !important;
    text-overflow: clip !important;
}

/* Ad sütunu (max-width: 100px və word-break) */
table.dataTable thead th.col-name,
table.dataTable tbody td.col-name,
.students-table th.col-name,
.students-table td.col-name,
.parents-table th.col-name,
.parents-table td.col-name {
    max-width: 100px !important;
    white-space: normal !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
}

table.dataTable tbody td.col-name *,
.students-table td.col-name *,
.parents-table td.col-name * {
    white-space: normal !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
}

.students-table th.col-surname,
.students-table td.col-surname,
.students-table th.col-father_name,
.students-table td.col-father_name {
    white-space: normal !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
}

.parents-table th.col-surname,
.parents-table td.col-surname,
.parents-table th.col-father_name,
.parents-table td.col-father_name {
    white-space: nowrap !important;
}

/* Şagird Cədvəli (Students Table) - Hər hissənin tam wrap olması */
.students-table th,
.students-table td,
.students-table th *,
.students-table td * {
    white-space: normal !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
    overflow: visible !important;
    text-overflow: clip !important;
}

.students-table th.col-code,
.students-table td.col-code,
.students-table th.col-email,
.students-table td.col-email,
.students-table th.col-fin,
.students-table td.col-fin,
.students-table th.col-profile__fin_code,
.students-table td.col-profile__fin_code,
.students-table td.col-code *,
.students-table td.col-email *,
.students-table td.col-fin * {
    word-break: break-all !important;
    overflow-wrap: anywhere !important;
    white-space: normal !important;
}

/* Telefon */
.parents-table th.col-phone,
.parents-table td.col-phone {
    width: 115px !important;
    white-space: nowrap !important;
    font-size: 12px !important;
    text-align: center !important;
}

/* Övlad sayı */
.parents-table th.col-children_count_col,
.parents-table td.col-children_count_col,
.parents-table th.col-children_count,
.parents-table td.col-children_count {
    width: 85px !important;
    white-space: nowrap !important;
    text-align: center !important;
}

/* 3. Əməliyyatlar (Actions) sütununun tam və səliqəli yerləşməsi */
.students-table th.actions-column,
.students-table td.actions-column,
.students-table th:last-child,
.students-table td:last-child,
.parents-table th.actions-column,
.parents-table td.actions-column,
.parents-table th:last-child,
.parents-table td:last-child {
    min-width: 105px !important;
    white-space: nowrap !important;
    padding-left: 6px !important;
    padding-right: 6px !important;
    text-align: center !important;
}

.students-table td.actions-column .datatable-actions-wrapper,
.students-table td:last-child .datatable-actions-wrapper,
.parents-table td.actions-column .datatable-actions-wrapper,
.parents-table td:last-child .datatable-actions-wrapper {
    gap: 4px !important;
    display: inline-flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: max-content !important;
    min-width: max-content !important;
}

.students-table td.actions-column .btn,
.students-table td:last-child .btn,
.parents-table td.actions-column .btn,
.parents-table td:last-child .btn {
    flex: 0 0 auto !important;
    flex-shrink: 0 !important;
    min-width: 28px !important;
    height: 28px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 3px 6px !important;
    font-size: 11.5px !important;
    line-height: 1.2 !important;
    box-sizing: border-box !important;
}

/* ── Stacked Modal: Valideyndən Uşaq Keçirmə Modalı (#transfer-child-modal) ── */
#transfer-child-modal {
    z-index: 100060 !important;
}

#transfer-child-modal .modal-dialog {
    z-index: 100061 !important;
}

.transfer-stacked-backdrop {
    z-index: 100055 !important;
}

#transfer-child-modal .select2-container--open,
.select2-container.select2-container--open {
    z-index: 100070 !important;
}

/* ── Global Layout, Sidebar & Responsive Wrapping Rules ── */
html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    width: 100% !important;
}

#layout-wrapper {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100vw !important;
}

.main-content {
    overflow-x: hidden !important;
    box-sizing: border-box !important;
    transition: margin-left 0.2s ease, width 0.2s ease;
}

/* 1. Collapsed Sidebar Mode (both Desktop and Mobile/Tablet when .vertical-collpsed is active) */
body.vertical-collpsed .navbar-brand-box {
    width: 70px !important;
}

body.vertical-collpsed .vertical-menu {
    width: 70px !important;
    position: fixed !important;
    top: 70px !important;
    left: 0 !important;
    bottom: 0 !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 1001 !important;
    pointer-events: auto !important;
}

body.vertical-collpsed .main-content {
    margin-left: 70px !important;
    width: calc(100% - 70px) !important;
    max-width: calc(100vw - 70px) !important;
    box-sizing: border-box !important;
}

/* 2. Mobile Responsive Rules (Screen Width <= 991.98px) */
@media (max-width: 991.98px) {
    /* If sidebar is neither open nor collapsed: hide completely and reset margin-left */
    body:not(.sidebar-enable):not(.vertical-collpsed) .vertical-menu {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        width: 0 !important;
        min-width: 0 !important;
        max-width: 0 !important;
        left: -350px !important;
        transform: translateX(-100%) !important;
        pointer-events: none !important;
    }

    body:not(.sidebar-enable):not(.vertical-collpsed) .main-content {
        margin-left: 0 !important;
        width: 100% !important;
        max-width: 100vw !important;
    }

    body:not(.sidebar-enable):not(.vertical-collpsed) .navbar-brand-box {
        width: auto !important;
    }

    /* When user opens full drawer on mobile via hamburger (sidebar-enable without vertical-collpsed) */
    body.sidebar-enable:not(.vertical-collpsed) .vertical-menu {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: fixed !important;
        top: 70px !important;
        bottom: 0 !important;
        left: 0 !important;
        width: 280px !important;
        max-width: 85vw !important;
        min-width: 260px !important;
        transform: translateX(0) !important;
        z-index: 99999 !important;
        pointer-events: auto !important;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45) !important;
        overflow-y: auto !important;
    }

    body.sidebar-enable:not(.vertical-collpsed) .main-content {
        margin-left: 0 !important;
        width: 100% !important;
    }

    /* Mobile backdrop overlay for drawer */
    body.sidebar-enable:not(.vertical-collpsed)::before {
        content: "";
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(15, 23, 42, 0.55);
        backdrop-filter: blur(2px);
        -webkit-backdrop-filter: blur(2px);
        z-index: 99995;
        pointer-events: auto;
    }

    /* Ensure button groups wrap gracefully on mobile/tablet */
    .btn-group:not(.btn-group-vertical):not(.no-wrap-mobile) {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 6px !important;
        width: 100% !important;
    }

    .btn-group:not(.btn-group-vertical):not(.no-wrap-mobile) > .btn,
    .btn-group:not(.btn-group-vertical):not(.no-wrap-mobile) > a.btn {
        border-radius: 4px !important;
        flex: 1 1 auto !important;
        text-align: center !important;
        white-space: normal !important;
        word-break: break-word !important;
    }
}

/* 3. Universal Element Wrapping & Screen Fit (Break Rules) */
.page-title-box h4 {
    white-space: normal !important;
    word-break: break-word !important;
    line-height: 1.3;
}

#schedule-action-bar,
#bulk-lock-group,
#matrix-view-group,
#std-view-group {
    max-width: 100% !important;
    box-sizing: border-box !important;
}

#schedule-action-bar .btn,
#schedule-action-bar a.btn,
#bulk-lock-group .btn {
    white-space: normal !important;
    word-break: break-word !important;
    line-height: 1.25;
}

/* =========================================
   SCHEDULE FILTERS - UNIFIED ALIGNMENT & HEIGHT
   ========================================= */
#schedule-filters {
    align-items: flex-end !important;
}

#schedule-filters .form-label,
#schedule-filters .filter-label {
    display: flex !important;
    align-items: center !important;
    height: 20px !important;
    min-height: 20px !important;
    max-height: 20px !important;
    line-height: 20px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #495057 !important;
    margin-bottom: 6px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

#schedule-filters .form-label.invisible {
    visibility: hidden !important;
}

#schedule-filters .form-select,
#schedule-filters .form-control {
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    font-size: 13px !important;
    border: 1px solid #ced4da !important;
    border-radius: 6px !important;
    padding: 6px 12px !important;
    line-height: 1.5 !important;
    background-color: #fff !important;
    box-sizing: border-box !important;
}

/* Week picker & Input groups */
#schedule-filters .input-group {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

#schedule-filters .input-group > .input-group-text {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    padding: 0 12px !important;
    background-color: #f8f9fa !important;
    border: 1px solid #ced4da !important;
    border-right: none !important;
    border-top-left-radius: 6px !important;
    border-bottom-left-radius: 6px !important;
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    flex-shrink: 0 !important;
    box-sizing: border-box !important;
}

#schedule-filters .input-group > .form-control {
    width: 1% !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    border: 1px solid #ced4da !important;
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    border-top-right-radius: 6px !important;
    border-bottom-right-radius: 6px !important;
    font-size: 13px !important;
    padding: 6px 12px !important;
    box-sizing: border-box !important;
}

/* Select2 Multiple & Single */
#schedule-filters .select2-container {
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
    box-sizing: border-box !important;
}

#schedule-filters .select2-container .select2-selection--multiple {
    min-height: 38px !important;
    height: auto !important;
    border: 1px solid #ced4da !important;
    border-radius: 6px !important;
    padding: 3px 6px !important;
    display: flex !important;
    align-items: center !important;
    background-color: #fff !important;
    box-sizing: border-box !important;
}

#schedule-filters .select2-container .select2-selection--multiple .select2-selection__rendered {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: normal !important;
    overflow: visible !important;
    white-space: normal !important;
    list-style: none !important;
    gap: 3px !important;
}

#schedule-filters .select2-container .select2-selection--multiple .select2-selection__choice {
    background-color: #e9ecef !important;
    border: 1px solid #ced4da !important;
    border-radius: 4px !important;
    padding: 2px 6px !important;
    margin: 2px 0 !important;
    font-size: 12px !important;
    line-height: 18px !important;
    display: inline-flex !important;
    align-items: center !important;
    flex-shrink: 0 !important;
    max-width: 100% !important;
    word-break: break-word !important;
}

#schedule-filters .select2-container .select2-selection--multiple .select2-search--inline {
    display: inline-flex !important;
    align-items: center !important;
    margin: 2px 0 !important;
    flex: 1 1 50px !important;
}

#schedule-filters .select2-container .select2-selection--multiple .select2-search--inline .select2-search__field {
    height: 26px !important;
    line-height: 26px !important;
    margin: 0 !important;
    padding: 0 4px !important;
    font-size: 13px !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    width: 100% !important;
}

#schedule-filters .select2-container .select2-selection--single {
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    border: 1px solid #ced4da !important;
    border-radius: 6px !important;
    display: flex !important;
    align-items: center !important;
    background-color: #fff !important;
    box-sizing: border-box !important;
}

#schedule-filters .select2-container .select2-selection--single .select2-selection__rendered {
    line-height: 36px !important;
    padding-left: 10px !important;
    padding-right: 24px !important;
    font-size: 13px !important;
    color: #495057 !important;
}

#schedule-filters .select2-container .select2-selection--single .select2-selection__arrow {
    height: 36px !important;
    top: 1px !important;
    right: 8px !important;
}

/* Switch card / toggle box */
#schedule-filters .filter-switch-card {
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    display: inline-flex !important;
    align-items: center !important;
    padding: 0 14px !important;
    background-color: #ffffff !important;
    border: 1px solid #ced4da !important;
    border-radius: 6px !important;
    box-sizing: border-box !important;
    white-space: nowrap !important;
    transition: all 0.15s ease-in-out;
}

#schedule-filters .filter-switch-card:hover {
    border-color: #b1b9c1 !important;
    background-color: #fbfbfc !important;
}

#schedule-filters .filter-switch-card .form-check {
    display: flex !important;
    align-items: center !important;
    margin: 0 !important;
    padding-left: 0 !important;
}

#schedule-filters .filter-switch-card .form-check-input {
    float: none !important;
    margin: 0 !important;
    cursor: pointer !important;
    width: 2em !important;
    height: 1.15em !important;
}

#schedule-filters .filter-switch-card .form-check-label {
    margin: 0 0 0 8px !important;
    cursor: pointer !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #495057 !important;
    line-height: 1 !important;
    user-select: none !important;
}

.table-responsive {
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
}

/* CKEditor Dialog & Backdrop z-index fix (must be above Bootstrap Modal 100000) */
.cke_dialog,
.cke_dialog_background_cover,
body .cke_dialog,
body .cke_dialog_background_cover {
    z-index: 200000 !important;
}

.cke_dialog_container,
body .cke_dialog_container {
    z-index: 200001 !important;
}


