/* ============================================ */
/* MAIN NAVIGATION MENU - NOTION STYLE #070D3C */
/* ============================================ */
.app-menu.navbar-menu {
    background: linear-gradient(135deg, #070d3c 0%, #0f1466 100%) !important;
}

#navbar-nav {
    background: transparent !important;
}

#navbar-nav .nav-link.menu-link {
    display: flex;
    align-items: center;
    padding: 10px 18px !important;
    line-height: 1.4 !important;
    color: #ffffff;
    text-decoration: none;
    transition: all 0.2s ease;
    border-radius: 6px;
    gap: 10px;
}

/* Desktop & Laptop - Larger Font */
@media (min-width: 992px) {
    #navbar-nav .nav-link.menu-link {
        font-size: 15px !important;
        padding: 5px 12px !important;
    }

    #navbar-nav .nav-link.menu-link i {
        font-size: 18px !important;
    }

    #navbar-nav .menu-dropdown .nav-link {
        font-size: 15px !important;
        padding: 10px 15px 10px 45px !important;
    }
}

/* Tablet */
@media (min-width: 768px) and (max-width: 991.98px) {
    #navbar-nav .nav-link.menu-link {
        font-size: 16px !important;
        padding: 10px 16px !important;
    }

    #navbar-nav .nav-link.menu-link i {
        font-size: 19px !important;
    }

    #navbar-nav .menu-dropdown .nav-link {
        font-size: 14.5px !important;
    }
}

/* Mobile */
@media (max-width: 767.98px) {
    #navbar-nav .nav-link.menu-link {
        font-size: 15px !important;
        padding: 6px 12px !important;
    }

    #navbar-nav .nav-link.menu-link i {
        font-size: 18px !important;
    }

    #navbar-nav .menu-dropdown .nav-link {
        font-size: 15px !important;
    }
}

/* Hide h2 on mobile screens */
@media (max-width: 767.98px) {
    h2.header-item.vertical-menu-btn.topnav-hamburger {
        display: none !important;
    }
}

#navbar-nav .nav-link.menu-link:hover,
#navbar-nav .nav-link.menu-link.active {
    background-color: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

#navbar-nav .nav-link.menu-link i {
    margin-right: 8px;
    line-height: 1;
    color: inherit;
}

#navbar-nav .nav-link.menu-link span {
    line-height: 1.3 !important;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#navbar-nav li {
    margin-bottom: 2px !important;
}

/* ============================================ */
/* MOBILE MENU BACKGROUND */
/* ============================================ */
@media (max-width: 991.98px) {
    #navbar-nav {
        background: linear-gradient(
            135deg,
            #070d3c 0%,
            #0f1466 100%
        ) !important;
        min-height: 100vh;
        width: 100%;
    }
}

/* ============================================ */
/* DROPDOWN MENU ITEMS - NOTION STYLE */
/* ============================================ */
.menu-dropdown {
    background: rgba(7, 13, 60, 0.95) !important;
    border-radius: 8px !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.menu-dropdown .nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    transition: all 0.2s ease;
}

.menu-dropdown .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
    padding-left: 50px !important;
}

/* ============================================ */
/* BANNER / TOPBAR - PROFESSIONAL GRADIENT */
/* ============================================ */
#page-topbar {
    background: linear-gradient(
        135deg,
        #070d3c 0%,
        #0f1466 50%,
        #1a2178 100%
    ) !important;
    border-bottom: none !important;
    box-shadow: 0 2px 20px rgba(7, 13, 60, 0.2) !important;
}

/* ============================================ */
/* FOOTER - PROFESSIONAL GRADIENT */
/* ============================================ */
footer {
    background: linear-gradient(135deg, #070d3c 0%, #0f1466 100%) !important;
    border-top: none !important;
    color: rgba(255, 255, 255, 0.7) !important;
}

.navbar-brand-box {
    display: flex;
    align-items: flex-start !important;
    justify-content: center;
    padding: 6px 12px 18px !important;
    max-height: var(--brand-max-height);
    box-sizing: border-box;
    margin-bottom: 10px;
    position: relative;
}

/* optional subtle separator line (modern UI style) */
.navbar-brand-box::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 12px;
    right: 12px;
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
}

/* Logo container */
.navbar-brand-box .logo {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 8px;
    text-decoration: none;
    transform: translateY(-2px);
}

/* Logo image */
.navbar-brand-box .logo img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto !important;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.2s ease;
}

.navbar-brand-box .logo img:hover {
    transform: scale(1.02);
}

/* Desktop Logo - Top aligned */
@media (min-width: 768px) {
    .navbar-brand-box {
        padding-top: 8px !important;
        align-items: flex-start !important;
    }

    .navbar-brand-box .logo-sm {
        display: none;
    }

    .navbar-brand-box .logo-lg {
        display: inline-block;
    }

    .navbar-brand-box .logo-lg img {
        height: var(--logo-lg-height);
        margin-top: 2px;
    }
}

/* Mobile Logo */
@media (max-width: 767.98px) {
    .navbar-brand-box {
        padding-top: 10px !important;
        align-items: flex-start !important;
    }

    .navbar-brand-box .logo-lg {
        display: none;
    }

    .navbar-brand-box .logo-sm {
        display: inline-block;
    }

    .navbar-brand-box .logo-sm img {
        height: var(--logo-sm-height);
        margin-top: 2px;
    }
}

/* Very small devices */
@media (max-width: 420px) {
    :root {
        --brand-max-height: 64px;
    }

    .navbar-brand-box {
        padding-top: 8px !important;
    }

    .navbar-brand-box .logo-sm img {
        height: 38px;
        margin-top: 0px;
    }
}

/* ============================================ */
/* TOAST NOTIFICATIONS - MODERN & PROFESSIONAL */
/* ============================================ */

/* ============================================ */
/* TOAST NOTIFICATIONS - MODERN & PROFESSIONAL */
/* ============================================ */

/* Toast Container */
.toastify {
    position: fixed;
    top: 20px;
    z-index: 9999;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Toast Inner */
.toastify .toast-inner {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 16px 20px;
    border-radius: 16px;
    box-shadow: 0 20px 35px -10px rgba(0, 0, 0, 0.2);
    min-width: 320px;
    max-width: 400px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(4px);
}

/* Toast Icon */
.toastify .toast-icon {
    flex-shrink: 0;
}

.toastify .toast-icon i {
    font-size: 28px;
    color: white;
    display: block;
}

/* Toast Content */
.toastify .toast-content {
    flex: 1;
}

.toastify .toast-content strong {
    font-size: 16px;
    font-weight: 700;
    color: white;
    display: block;
    margin-bottom: 4px;
}

.toastify .toast-content span {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    display: block;
    line-height: 1.4;
}

/* Toast Close Button */
.toastify .toast-close {
    cursor: pointer;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    transition: all 0.2s ease;
    color: white;
    font-size: 18px;
    font-weight: 300;
    flex-shrink: 0;
}

.toastify .toast-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

/* Toast Progress Bar */
.toastify .toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.35);
    width: 100%;
    animation: progressShrink 2.5s linear forwards;
    pointer-events: none;
}

@keyframes progressShrink {
    0% {
        width: 100%;
    }
    100% {
        width: 0%;
    }
}

/* Toast Colors - Premium */
.toastify[data-type="success"] .toast-inner {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-left: 4px solid #34d399;
}

.toastify[data-type="warning"] .toast-inner {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border-left: 4px solid #fbbf24;
}

.toastify[data-type="error"] .toast-inner {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border-left: 4px solid #f87171;
}

.toastify[data-type="info"] .toast-inner {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-left: 4px solid #60a5fa;
}

/* RTL Support */
html.rtl .toastify[data-type="success"] .toast-inner {
    border-left: none;
    border-right: 4px solid #34d399;
}

html.rtl .toastify[data-type="warning"] .toast-inner {
    border-left: none;
    border-right: 4px solid #fbbf24;
}

html.rtl .toastify[data-type="error"] .toast-inner {
    border-left: none;
    border-right: 4px solid #f87171;
}

html.rtl .toastify[data-type="info"] .toast-inner {
    border-left: none;
    border-right: 4px solid #60a5fa;
}

/* RTL Text Alignment */
html.rtl .toastify .toast-content {
    text-align: right;
}

html.rtl .toastify .toast-close {
    margin-left: 0;
}

/* Animation Keyframes */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes slideOutLeft {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(-100%);
        opacity: 0;
    }
}

/* LTR Animation */
html:not(.rtl) .toastify {
    right: 20px;
}

/* RTL Animation */
html.rtl .toastify {
    left: 20px;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .toastify .toast-inner {
        min-width: calc(100vw - 40px);
        max-width: calc(100vw - 40px);
        margin: 0 10px;
        padding: 12px 16px;
    }

    .toastify {
        left: 10px !important;
        right: 10px !important;
    }

    .toastify .toast-icon i {
        font-size: 22px;
    }

    .toastify .toast-content strong {
        font-size: 14px;
    }

    .toastify .toast-content span {
        font-size: 11px;
    }

    .toastify .toast-close {
        width: 24px;
        height: 24px;
        font-size: 16px;
    }
}

/* ============================================ */
/* SWEET ALERT - MODERN STYLES FOR YOUR DELETE MODAL */
/* ============================================ */

/* Main Popup */
.swal2-popup {
    border-radius: 24px !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
    padding: 0 !important;
    width: 450px !important;
    max-width: 90vw !important;
}

/* Title */
.swal2-title {
    font-size: 1.6rem !important;
    font-weight: 800 !important;
    color: #1e293b !important;
    margin: 24px 24px 0 24px !important;
    padding: 0 !important;
}

/* Content/Text */
.swal2-html-container {
    font-size: 0.95rem !important;
    color: #475569 !important;
    line-height: 1.5 !important;
    margin: 8px 24px 0 24px !important;
    padding: 0 !important;
}

/* Icon/Warning */
.swal2-icon.swal2-warning {
    border-color: #f59e0b !important;
    color: #f59e0b !important;
    margin: 20px auto 10px auto !important;
}

.swal2-icon.swal2-warning [class^="swal2-icon-content"] {
    color: #f59e0b !important;
    font-size: 3rem !important;
}

/* Custom Icon with ri-alert-line */
.swal2-icon .ri-alert-line {
    font-size: 3rem !important;
    display: inline-block !important;
}

/* Buttons Container */
.swal2-actions {
    gap: 15px !important;
    margin: 20px 24px 24px 24px !important;
    padding: 0 !important;
}

/* Confirm Button - Yes, delete it */
.custom-swal-button.btn-primary {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    color: white !important;
    border: none !important;
    padding: 12px 28px !important;
    border-radius: 12px !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3) !important;
}

.custom-swal-button.btn-primary:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.4) !important;
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
}

/* Cancel Button - No, keep it */
.custom-swal-button.btn-danger {
    background: #f1f5f9 !important;
    color: #475569 !important;
    border: 1px solid #e2e8f0 !important;
    padding: 12px 28px !important;
    border-radius: 12px !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.custom-swal-button.btn-danger:hover {
    background: #e2e8f0 !important;
    transform: translateY(-2px) !important;
}

/* Remove default button styling */
.swal2-confirm,
.swal2-cancel {
    background: none !important;
    box-shadow: none !important;
}

/* Backdrop */
.swal2-backdrop {
    backdrop-filter: blur(8px) !important;
    background: rgba(0, 0, 0, 0.5) !important;
}

/* Animation */
.swal2-show {
    animation: swalModernIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.swal2-hide {
    animation: swalModernOut 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

@keyframes swalModernIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes swalModernOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.95);
    }
}

/* RTL Support for SweetAlert */
html.rtl .swal2-popup {
    direction: rtl !important;
}

html.rtl .swal2-title,
html.rtl .swal2-html-container {
    text-align: center !important;
}

html.rtl .swal2-actions {
    flex-direction: row-reverse !important;
}

html.rtl .custom-swal-button.btn-primary {
    margin-right: 0 !important;
    margin-left: 8px !important;
}

html.rtl .custom-swal-button.btn-danger {
    margin-left: 0 !important;
    margin-right: 8px !important;
}

/* Responsive Mobile */
@media (max-width: 576px) {
    .swal2-popup {
        width: calc(100% - 32px) !important;
        border-radius: 20px !important;
    }

    .swal2-title {
        font-size: 1.3rem !important;
        margin: 20px 20px 0 20px !important;
    }

    .swal2-html-container {
        font-size: 0.85rem !important;
        margin: 8px 20px 0 20px !important;
    }

    .swal2-actions {
        gap: 10px !important;
        margin: 16px 20px 20px 20px !important;
        flex-direction: column !important;
    }

    .custom-swal-button.btn-primary,
    .custom-swal-button.btn-danger {
        width: 100% !important;
        padding: 10px 20px !important;
        text-align: center !important;
    }

    /* RTL Mobile */
    html.rtl .swal2-actions {
        flex-direction: column !important;
    }
}

/* Loading/Processing State */
.swal2-loader {
    border-color: #8b5cf6 !important;
    border-top-color: transparent !important;
}

/* Timer Progress Bar */
.swal2-timer-progress-bar {
    background: linear-gradient(90deg, #8b5cf6, #c084fc) !important;
}

/* Footer (if any) */
.swal2-footer {
    border-top: 1px solid #f1f5f9 !important;
    color: #64748b !important;
    font-size: 0.8rem !important;
}

/* Close Button */
.swal2-close {
    color: #94a3b8 !important;
    transition: all 0.2s ease !important;
}

.swal2-close:hover {
    color: #475569 !important;
    transform: scale(1.1) !important;
}

/* ============================================ */
/* CUSTOM HEADER BUTTONS */
/* ============================================ */
.btn-custom-header {
    background: rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    border-radius: 6px !important;
    padding: 6px 14px !important;
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    transition: all 0.15s ease;
    height: 32px !important;
    min-width: 80px !important;
}

.btn-custom-header:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    transform: translateY(-1px);
}

/* ============================================ */
/* TABLE HEADER */
/* ============================================ */
div#tableHeader.card-header {
    background-color: #e6e8ec !important;
    color: #1a1a1a !important;
    padding: 14px 20px !important;
    font-weight: 600 !important;
    font-size: 16px !important;
    border-bottom: 1px solid #cfd4dc !important;
}

/* ============================================ */
/* RESPONSIVE ADJUSTMENTS */
/* ============================================ */
@media (max-width: 600px) {
    .btn-custom-header {
        font-size: 11px !important;
        padding: 4px 10px !important;
        height: 28px !important;
        min-width: 60px !important;
    }
}

@media (max-width: 991.98px) {
    #page-topbar .header-item .btn,
    #page-topbar .topbar-head-dropdown .btn {
        width: 30px !important;
        height: 30px !important;
        border-radius: 50% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        background: rgba(255, 255, 255, 0.15) !important;
        color: #ffffff !important;
    }

    #page-topbar .topbar-user .user-name-text {
        display: none !important;
    }
}

/* ============================================ */
/* FORM ELEMENTS */
/* ============================================ */
input::placeholder,
textarea::placeholder {
    font-size: 14px !important;
    color: #888 !important;
}

/* ============================================ */
/* SPINNER LOADING */
/* ============================================ */
.spinner-border {
    width: 1.2rem;
    height: 1.2rem;
    border: 0.2em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* ============================================ */
/* SELECT2 OVERRIDES */
/* ============================================ */
.select2-container--bootstrap4 .select2-selection--single {
    height: 38px !important;
    padding: 0.375rem 0.75rem !important;
    font-size: 14px !important;
    border-radius: 0.25rem !important;
    border: 1px solid #ced4da !important;
}

.select2-container--bootstrap4 .select2-results__option--highlighted {
    background-color: #8c7aa6 !important;
    color: #fff !important;
}

/* ============================================ */
/* COLLAPSIBLE SEARCH SECTION */
/* ============================================ */
.collapsible {
    max-height: 0;
    overflow: hidden;
    transition:
        max-height 0.3s ease,
        opacity 0.3s ease;
    opacity: 0;
    background: #f0f0f0;
}

.collapsible.expanded {
    max-height: 1000px;
    opacity: 1;
}

/* ============================================ */
/* TOTAL DISPLAY SECTION */
/* ============================================ */
#total-display {
    background: linear-gradient(90deg, #f7fafd 0%, #ffffff 100%);
    color: #000;
    font-size: 13px;
    font-weight: bold;
    padding: 10px 16px;
    border: 1px solid #dae2ea;
    border-radius: 8px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

#total-display:hover {
    background-color: #e2e6ea;
}

/* ============================================ */
/* BRAND / LOGO STYLES - PROFESSIONAL */
/* ============================================ */
:root {
    --brand-max-height: 76px;
    --logo-lg-height: 52px;
    --logo-sm-height: 42px;
}

/* ============================================ */
/* UTILITY CLASSES */
/* ============================================ */
.select2-container {
    width: 100% !important;
}

input.readonly {
    background-color: #e9f5ff !important;
    cursor: not-allowed;
}

.dropdown-menu {
    background-color: #f5ead0 !important;
    border: 1px solid #c8a039 !important;
    border-radius: 8px !important;
}

/* ============================================ */
/* RESPONSIVE TABLE & BUTTONS */
/* ============================================ */
@media (max-width: 768px) {
    .collapsible .row > [class*="col-"] {
        flex: 0 0 100% !important;
        margin-bottom: 10px;
    }

    .collapsible .row button {
        width: 100% !important;
    }
}

/* ============================================ */
/* CARD HEADER - MODERN & CLEAN */
/* ============================================ */

div#tableHeader.card-header[style],
.card-header.title-header[style],
#tableHeader[style],
.card-header[style] {
    background: #ffffff !important;
    border-bottom: 2px solid #f1f5f9 !important;
    padding: 16px 24px !important;
    border-radius: 20px 20px 0 0 !important;
}

#tableInformationHeading[style],
.card-header .card-title[style] {
    color: #0f172a !important;
    font-size: 1.2rem !important;
    font-weight: 700 !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

#tableInformationHeading[style]::before,
.card-header .card-title[style]::before {
    content: "▍" !important;
    color: #8b5cf6 !important;
}

/* Buttons - KEEPING ORIGINAL COLORS */
#tableHeader .btn,
.card-header .btn {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed) !important;
    border: none !important;
    color: #fff !important;
    padding: 8px 20px !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    border-radius: 12px !important;
    transition: 0.2s !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
}

#tableHeader .btn-success {
    background: linear-gradient(135deg, #10b981, #059669) !important;
}

#tableHeader .btn-secondary {
    background: linear-gradient(135deg, #64748b, #475569) !important;
}

#tableHeader .btn:hover,
.card-header .btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15) !important;
}

/* ============================================ */
/* CARD HEADER BUTTONS - 100% RESPONSIVE MOBILE */
/* ============================================ */

/* Tablet & Mobile */
@media (max-width: 768px) {
    div#tableHeader.card-header[style],
    .card-header.title-header[style],
    #tableHeader[style],
    .card-header[style] {
        padding: 12px 16px !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 10px !important;
    }

    #tableInformationHeading[style],
    .card-header .card-title[style] {
        font-size: 1rem !important;
        flex: 1 !important;
    }

    #tableHeader div,
    .card-header div {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 8px !important;
        flex-shrink: 0 !important;
    }

    #tableHeader .btn,
    .card-header .btn {
        padding: 6px 14px !important;
        font-size: 0.75rem !important;
        width: auto !important;
        min-width: auto !important;
    }

    #tableHeader .btn-icon,
    .card-header .btn-icon {
        width: 32px !important;
        height: 32px !important;
        padding: 0 !important;
    }

    #tableHeader .btn-icon i,
    .card-header .btn-icon i {
        font-size: 0.9rem !important;
    }
}

/* Small Mobile - wrap title and buttons */
@media (max-width: 480px) {
    div#tableHeader.card-header[style],
    .card-header.title-header[style],
    #tableHeader[style],
    .card-header[style] {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
        padding: 12px 14px !important;
    }

    #tableInformationHeading[style],
    .card-header .card-title[style] {
        font-size: 0.95rem !important;
        justify-content: flex-start !important;
    }

    #tableHeader div,
    .card-header div {
        justify-content: flex-end !important;
    }

    #tableHeader .btn,
    .card-header .btn {
        padding: 6px 12px !important;
        font-size: 0.7rem !important;
    }

    #tableHeader .btn-icon,
    .card-header .btn-icon {
        width: 30px !important;
        height: 30px !important;
    }
}

/* Desktop - keep horizontal */
@media (min-width: 769px) {
    div#tableHeader.card-header[style],
    .card-header.title-header[style],
    #tableHeader[style],
    .card-header[style] {
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
    }
}

/* ============================================ */
/* MODAL - MODERN & PROFESSIONAL DESIGN */
/* ============================================ */

/* Modal Content - Premium Glass Effect */
.modal-content {
    border-radius: 28px !important;
    border: none !important;
    overflow: hidden !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
    background: #ffffff !important;
}

/* Modal Header - Modern Gradient */
.modal-header {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%) !important;
    padding: 20px 28px !important;
    border-bottom: none !important;
    position: relative !important;
    overflow: hidden !important;
}

/* Decorative overlay effect for header */
.modal-header::before {
    content: "" !important;
    position: absolute !important;
    top: -50% !important;
    right: -20% !important;
    width: 200px !important;
    height: 200px !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border-radius: 50% !important;
    pointer-events: none !important;
}

.modal-header::after {
    content: "" !important;
    position: absolute !important;
    bottom: -30% !important;
    left: -10% !important;
    width: 150px !important;
    height: 150px !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border-radius: 50% !important;
    pointer-events: none !important;
}

/* Modal Title */
.modal-title {
    color: #ffffff !important;
    font-size: 1.3rem !important;
    font-weight: 700 !important;
    letter-spacing: -0.3px !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    position: relative !important;
    z-index: 1 !important;
}

.modal-title::before {
    content: "✨" !important;
    font-size: 1.2rem !important;
}

/* Modal Close Button - Modern Glass */
.btn-close {
    background: rgba(255, 255, 255, 0.2) !important;
    border-radius: 50% !important;
    padding: 10px !important;
    opacity: 1 !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    backdrop-filter: blur(4px) !important;
    position: relative !important;
    z-index: 1 !important;
}

.btn-close:hover {
    background: rgba(255, 255, 255, 0.35) !important;
    transform: rotate(90deg) scale(1.1) !important;
}

/* Modal Body - Clean White */
.modal-body {
    padding: 28px !important;
    background: #ffffff !important;
}

/* Modal Footer - Clean Border */
.modal-footer {
    padding: 20px 28px !important;
    border-top: 1px solid #f1f5f9 !important;
    background: #fafcff !important;
    gap: 12px !important;
}

/* Modal Footer Buttons */
.modal-footer .btn {
    padding: 10px 24px !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    border-radius: 12px !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
}

/* Cancel Button */
.modal-footer .btn-secondary {
    background: #f1f5f9 !important;
    border: 1.5px solid #e2e8f0 !important;
    color: #475569 !important;
}

.modal-footer .btn-secondary:hover {
    background: #e2e8f0 !important;
    transform: translateY(-2px) !important;
}

/* Save/Submit Button */
.modal-footer .btn-primary {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%) !important;
    border: none !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3) !important;
}

.modal-footer .btn-primary:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.4) !important;
}

/* Modal Animation */
.modal.fade .modal-dialog {
    transform: scale(0.95) translateY(-20px) !important;
    transition: all 0.3s ease !important;
}

.modal.show .modal-dialog {
    transform: scale(1) translateY(0) !important;
}

/* Modal Backdrop */
.modal-backdrop {
    backdrop-filter: blur(8px) !important;
    background: rgba(0, 0, 0, 0.5) !important;
}

.modal-backdrop.show {
    opacity: 1 !important;
}

/* ============================================ */
/* MODAL INPUT FIELDS - MODERN */
/* ============================================ */

.modal-body .form-control,
.modal-body .select2-container--bootstrap4 .select2-selection {
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 14px !important;
    padding: 10px 16px !important;
    transition: all 0.3s ease !important;
    font-size: 0.9rem !important;
    width: 100% !important;
}

.modal-body .form-control:focus,
.modal-body .select2-container--bootstrap4 .select2-selection:focus {
    border-color: #8b5cf6 !important;
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.1) !important;
    outline: none !important;
}

.modal-body label {
    font-weight: 600 !important;
    color: #1e293b !important;
    margin-bottom: 8px !important;
    font-size: 0.8rem !important;
    display: block !important;
}

/* ============================================ */
/* VALIDATION MESSAGES - SMALL & RED */
/* ============================================ */

.modal-body .invalid-feedback,
.modal-body .error-message,
.modal-body .text-danger,
.modal-body small.text-danger,
.modal-body span.text-danger {
    font-size: 11px !important;
    color: #ef4444 !important;
    margin-top: 5px !important;
    display: block !important;
}

/* Input error state */
.modal-body .form-control.is-invalid,
.modal-body .form-control:invalid {
    border-color: #ef4444 !important;
}

/* Input valid state */
.modal-body .form-control.is-valid,
.modal-body .form-control:valid {
    border-color: #10b981 !important;
}

/* ============================================ */
/* RTL SUPPORT FOR MODAL */
/* ============================================ */

/* RTL (Pashto/Dari) */
html.rtl .modal-header {
    text-align: right !important;
}

html.rtl .modal-title {
    text-align: right !important;
    width: 100% !important;
}

html.rtl .modal-title::before {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

html.rtl .btn-close {
    margin-left: 0 !important;
    margin-right: auto !important;
}

html.rtl .modal-footer {
    flex-direction: row-reverse !important;
}

html.rtl .modal-footer .btn-secondary {
    margin-right: 0 !important;
    margin-left: 12px !important;
}

html.rtl .modal-body {
    text-align: right !important;
}

html.rtl .modal-body .form-control {
    text-align: right !important;
}

/* LTR (English) */
html:not(.rtl) .modal-header {
    text-align: left !important;
}

html:not(.rtl) .modal-footer {
    flex-direction: row !important;
}

/* ============================================ */
/* RESPONSIVE MODAL */
/* ============================================ */

@media (max-width: 768px) {
    .modal-header {
        padding: 16px 20px !important;
    }

    .modal-title {
        font-size: 1.1rem !important;
    }

    .modal-body {
        padding: 20px !important;
    }

    .modal-footer {
        padding: 16px 20px !important;
        flex-direction: column !important;
    }

    .modal-footer .btn {
        width: 100% !important;
        justify-content: center !important;
        padding: 10px 16px !important;
    }

    /* RTL Mobile */
    html.rtl .modal-footer {
        flex-direction: column !important;
    }

    html.rtl .modal-footer .btn-secondary {
        margin-left: 0 !important;
    }
}

@media (max-width: 480px) {
    .modal-header {
        padding: 14px 16px !important;
    }

    .modal-title {
        font-size: 1rem !important;
    }

    .modal-body {
        padding: 16px !important;
    }

    .modal-footer {
        padding: 14px 16px !important;
    }

    .modal-body .form-control {
        padding: 8px 12px !important;
        font-size: 0.85rem !important;
    }

    .modal-body .invalid-feedback {
        font-size: 10px !important;
    }
}

/* ============================================ */
/* SEARCH FORM - MODERN & CLEAN */
/* ============================================ */

#searchForm {
    background: #fff;
    border-radius: 20px;
    padding: 16px 20px;
    margin-bottom: 24px;
    border: 1px solid #f1f5f9;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

#searchForm .row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
}

#searchForm .mb-3 {
    flex: 1;
    min-width: 140px;
    margin-bottom: 0 !important;
}

#searchForm .form-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 4px;
    display: block;
}

#searchForm .form-control,
#searchForm .select2-container--bootstrap4 .select2-selection {
    height: 40px !important;
    border-radius: 10px !important;
    border: 1px solid #e2e8f0 !important;
    font-size: 0.8rem !important;
}

#searchForm .form-control:focus,
#searchForm .select2-container--bootstrap4 .select2-selection:focus {
    border-color: #8b5cf6 !important;
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.1) !important;
}

/* SELECT2 VERTICAL CENTER */
.select2-container--bootstrap4 .select2-selection--single {
    display: flex !important;
    align-items: center !important;
}

.select2-container--bootstrap4 .select2-selection__rendered {
    line-height: normal !important;
    padding-left: 12px !important;
    font-size: 0.8rem !important;
    display: flex !important;
    align-items: center !important;
    height: 100% !important;
}

.select2-container--bootstrap4 .select2-selection__arrow {
    height: 100% !important;
    right: 8px !important;
    display: flex !important;
    align-items: center !important;
}

.select2-dropdown {
    border-radius: 10px !important;
    font-size: 0.8rem !important;
}

/* Search Buttons */
#searchForm .btn {
    height: 40px;
    padding: 0 20px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 10px;
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    border: none;
    color: #fff;
}

#searchForm .btn-secondary {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

/* BUTTONS SIDE BY SIDE ON MOBILE */
#searchForm .col-3 {
    flex: 0 0 auto;
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

@media (min-width: 992px) {
    #searchForm .col-2 {
        flex: 1;
    }
    #searchForm .col-3 {
        flex: 0 0 auto;
    }
}

@media (max-width: 991px) {
    #searchForm .col-2 {
        flex: 1 1 calc(33.33% - 12px);
    }
    #searchForm .col-3 {
        flex: 1 1 100%;
        margin-top: 8px;
    }
    #searchForm .col-3 {
        display: flex;
        flex-direction: row;
        gap: 8px;
    }
    #searchForm .col-3 .btn {
        flex: 1;
        justify-content: center;
    }
}

@media (max-width: 767px) {
    #searchForm .row {
        flex-direction: column;
    }
    #searchForm .col-2,
    #searchForm .col-3 {
        width: 100%;
    }
    #searchForm .col-3 {
        flex-direction: row !important;
        gap: 8px;
    }
    #searchForm .col-3 .btn {
        flex: 1;
        width: auto !important;
    }
}

@media (max-width: 480px) {
    #searchForm .col-3 {
        flex-direction: row !important;
        gap: 8px;
    }
    #searchForm .col-3 .btn {
        flex: 1;
        font-size: 0.7rem;
        padding: 0 12px;
    }
}

/* ============================================ */
/* BANNER & NAVIGATION - MODERN INDIGO */
/* ============================================ */

#page-topbar {
    background: linear-gradient(135deg, #1e1b4b, #312e81, #4338ca) !important;
}

.app-menu.navbar-menu {
    background: linear-gradient(135deg, #1e1b4b, #312e81) !important;
}

footer {
    background: linear-gradient(135deg, #1e1b4b, #312e81) !important;
}

/* ============================================ */
/* VALIDATION MESSAGES */
/* ============================================ */

.invalid-feedback,
.text-danger {
    font-size: 0.7rem !important;
    color: #ef4444 !important;
    margin-top: 4px !important;
}

/* ============================================ */
/* GLOBAL IMPROVEMENTS */
/* ============================================ */

* {
    box-sizing: border-box;
}

body {
    background: #f8fafc;
}

.card {
    border-radius: 20px !important;
    overflow: hidden !important;
    border: none !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

.table-responsive {
    border-radius: 0 0 20px 20px !important;
}

/* Modern Toast Notifications - Additional Overrides */
.modern-toast {
    pointer-events: auto;
}

.modern-toast:hover .toast-inner {
    transform: translateY(-2px);
    transition: transform 0.2s ease;
}

/* Mobile Toast Responsive */
@media (max-width: 480px) {
    .toastify .toast-inner {
        min-width: calc(100vw - 40px);
        max-width: calc(100vw - 40px);
        margin: 0 10px;
    }

    .toastify {
        left: 10px !important;
        right: 10px !important;
    }
}
