﻿:root {
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 80px;
    --sidebar-bg: #0d6efd;
    --sidebar-hover: #0b5ed7;
    --sidebar-color: #fff;
    --transition-speed: 0.3s;
}

body {
    margin: 0;
    direction: ltr;
    font-family: 'Segoe UI', sans-serif;
}

.app-container {
    display: flex;
    height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    /*height: 100vh;*/
    background-color: var(--sidebar-bg);
    color: var(--sidebar-color);
    transition: width var(--transition-speed);
    /* overflow-x: hidden;
    overflow-y: auto;*/
    flex-shrink: 0;
}
    /*    .sidebar.collapsed {
        min-width: 60px;
        max-width: 60px;
        overflow: hidden;
    }*/

    .sidebar.collapsed {
        width: var(--sidebar-collapsed-width);
        overflow: hidden;
    }

.sidebar-header {
    font-size: 1.3rem;
    font-weight: bold;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-title {
    font-size: 1.25rem;
    font-weight: bold;
    white-space: nowrap;
}

.sidebar.collapsed .sidebar-title,
.sidebar.collapsed .sidebar-header span {
    display: none;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

    .sidebar-menu > li {
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .sidebar-menu li a,
    .submenu-link {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 10px 15px;
        color: var(--sidebar-color);
        text-decoration: none;
        white-space: wrap;
        transition: background-color var(--transition-speed);
    }

        .sidebar-menu li a:hover,
        .submenu-link:hover {
            background-color: var(--sidebar-hover);
            color:currentColor;
        }

    .sidebar-menu li ul {
        padding-left: 1.5rem;
    }

        .sidebar-menu li ul li ul {
            padding-left: 1.5rem;
        }

.sidebar.collapsed .sidebar-menu span,
.sidebar.collapsed .sidebar-menu li ul,
.sidebar.collapsed .link-text,
.sidebar.collapsed i.bi-chevron-down,
.sidebar.collapsed .sidebar-search,
.sidebar.collapsed .sidebar-menu .nav-item.dropdown {
    display: none;
}

.main-content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

.nav > li > a {
    padding: 6px 10px;
    font-size: 14px;
}

.sidebar .nav li {
    margin-bottom: 4px;
}

.sidebar .nav .submenu-link {
    padding: 6px 10px;
    font-size: 14px;
}

.sidebar .collapse ul {
    padding-left: 12px;
}

    .sidebar .collapse ul li a {
        padding: 4px 6px;
        font-size: 13px;
    }

.sidebar .submenu {
    padding-right: 15px;
    padding-left: 30px;
}

.sidebar .submenu-item {
    padding: 5px 0;
    font-size: 0.9rem;
    color: #dcdcdc;
}

.sidebar .nav-icon {
    font-size: 1.2rem;
}

.sidebar .toggle-btn {
    border: none;
    background: none;
    color: var(--sidebar-color);
    font-size: 1.2rem;
    padding: 10px 15px;
    text-align: left;
    width: 100%;
}

.link-text {
    white-space: nowrap;
}

/* Shake animation */
.input-shadow {
    box-shadow: 0 0 5px rgba(0,0,0,0.05);
}

.shake {
    animation: shake 0.3s;
}

@keyframes shake {
    0% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    50% {
        transform: translateX(5px);
    }

    75% {
        transform: translateX(-5px);
    }

    100% {
        transform: translateX(0);
    }
}

/* Flash animation */
@keyframes flashRow {
    0% {
        background-color: #ffff99;
    }
    /* light yellow */
    50% {
        background-color: #fff;
    }

    100% {
        background-color: #fff;
    }
}

.flash-highlight {
    animation: flashRow 1s ease;
}
/* Footer Top Info */
.footer-top-bar {
    background: #0b1a55;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Main Footer */
.footer-main {
    /*background: #22355d;*/
    background: linear-gradient(135deg, #0d6efd, #6610f2);
    color: #f8f9fa;
}

.footer-logo {
    max-width: 120px;
    height: auto;
}

.footer-main h6 {
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.footer-links a {
    display: block;
    color: rgba(248, 249, 250, 0.85);
    text-decoration: none;
    padding: 3px 0;
    /*transition: all 0.3s ease;*/
}

    .footer-links a:hover {
        /*color: #ffc107;*/
        padding-left: 5px;
        font-weight: 500;
    }

/* Social Icons */
.social-icons a {
    font-size: 1.3rem;
    margin-right: 12px;
    color: rgba(248, 249, 250, 0.85);
    /*    transition: transform 0.3s, color 0.3s;
*/
}

    .social-icons a:hover {
        /*transform: scale(1.2);*/
        /*color: #ffca28;*/
    }

/* Scroll-to-Top Button */
.scroll-top-btn {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 45px;
    height: 45px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #3949ab, #1a237e);
    color: #fff;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

    .scroll-top-btn.show {
        opacity: 1;
        visibility: visible;
    }

    .scroll-top-btn:hover {
        transform: scale(1.1);
        background: linear-gradient(135deg, #ffca28, #ffc107);
    }

/* Responsive Layout */
@media (max-width: 767px) {
    .footer-main .text-md-start {
        text-align: center !important;
    }

    .footer-top-bar {
        text-align: center;
    }
}
/* Logo scales with navbar height */
.brand-logo {
    height: 2.2rem; /* matches toggler button height */
    width: auto;
    max-height: 48px;
}

/* Larger on desktop */
@media (min-width: 992px) {
    .brand-logo {
        height: 2.6rem;
        max-height: 56px;
    }
}

/* Custom navbar toggler */
.custom-toggler {
    border: none; /* remove default border */
    padding: 0.5rem 0.6rem; /* balanced spacing */
    border-radius: 0.75rem; /* smooth rounded corners */
    background-color: #f8f9fa; /* subtle light bg */
    box-shadow: 0 2px 6px rgba(0,0,0,0.08); /* soft shadow */
    transition: all 0.3s ease-in-out;
}

    /* Hover / focus effect */
    .custom-toggler:hover,
    .custom-toggler:focus {
        background-color: #e9ecef; /* slightly darker */
        transform: scale(1.05); /* subtle zoom */
    }

/* Optional: dark mode adjustment */
@media (prefers-color-scheme: dark) {
    .custom-toggler {
        background-color: #2c2c2c;
        box-shadow: 0 2px 6px rgba(255,255,255,0.05);
    }

        .custom-toggler:hover {
            background-color: #3a3a3a;
        }
}
/* Dropdown menu refinement */
.dropdown-menu {
    min-width: 220px;
    padding: 0.5rem 0;
    font-size: 0.95rem;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

    .dropdown-item:hover {
        background-color: #f8f9fa;
        padding-left: 1.25rem;
    }
/* Mobile */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: -250px;
        z-index: 1000;
        box-shadow: 0 0 0 rgba(0,0,0,0);
    }

        .sidebar.active {
            left: 0;
            box-shadow: 4px 0 12px rgba(0,0,0,0.3);
        }

    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.35);
        backdrop-filter: blur(2px);
        z-index: 999;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

        .sidebar-overlay.active {
            display: block;
            opacity: 1;
        }

    .mobile-toggle {
        position: fixed;
        top: 10px;
        left: 10px;
        z-index: 1100;
        border: none;
        background: #333;
        color: #fff;
        font-size: 1.5rem;
        padding: 6px 12px;
        border-radius: 4px;
    }

    .toggle-btn {
        display: none;
    }
}
/* Sidebar base */
.sidebar {
    /*position: relative;*/
    width: 250px;
    height: 100vh;
    /*background: #163ccc;*/
    color: #fff;
    transition: left 0.3s ease, box-shadow 0.3s ease;
    overflow-y: auto;
}

.sidebar-header {
    /*background: linear-gradient(90deg, #1f2937, #111827);*/ /* Dark professional gradient */
    border-bottom: 1px solid rgba(255,255,255,0.1);
    height: 60px;
    padding: 0 1rem;
    display:none;
}

    .sidebar-header i {
        transition: transform 0.3s ease;
    }

    .sidebar-header .toggle-btn {
        background: none;
        border: none;
        cursor: pointer;
        padding: 0.35rem 0.5rem;
        border-radius: 4px;
        transition: background 0.2s ease;
    }

        .sidebar-header .toggle-btn:hover {
            background: rgba(255,255,255,0.1);
        }

    .sidebar-header span {
        letter-spacing: 0.5px;
    }


.sidebar a {
    display: block;
    padding: 0.75rem 1rem;
    color: #fff;
    text-decoration: none;
    transition: background 0.2s;
}

    .sidebar a:hover {
        background: rgba(255,255,255,0.1);
    }

.toggle-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
}

/* Child menu animation */
.child-menu {
    transition: all 0.3s ease;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
}

.collapse.show > .child-menu {
    opacity: 1;
    max-height: 500px;
}

/* Chevron rotation */
.chevron-icon {
    transition: transform 0.3s ease;
}

.collapse.show + .chevron-icon,
.parent-link.collapsed + .chevron-icon {
    transform: rotate(0deg);
}

.parent-link[aria-expanded="true"] .chevron-icon {
    transform: rotate(180deg);
}

.sidebar {
    /*position: fixed;*/
    /*left: -250px;
    top: 0;
    width: 250px;*/
    height: 100%;
    background: #22355d; /* #111827;*/
    color: #fff;
    transition: left 0.3s ease;
    z-index: 1050;
    overflow-y: auto;
}

    .sidebar.active {
        left: 0;
    }

.sidebar-header {
    height: 60px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding: 0 1rem;
}

.sidebar a {
    display: block;
    padding: .75rem 1rem;
    color: #fff;
    text-decoration: none;
    transition: .2s;
}

    .sidebar a:hover {
        background: rgba(255,255,255,0.1);
    }

.submenu-text {
    display: inline-block;
    max-width: 180px;
    word-wrap: break-word;
}

/*.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,.35);
    backdrop-filter: blur(2px);
    z-index: 1040;
    opacity: 0;
    transition: .3s;
}*/

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/*#sidebarSearch {
    border-radius: 0.35rem;
    padding-left: 2rem;
    background: #1f2937;
    color: #fff;*/
/*margin: 0.5rem 1rem;*/
/*}

    #sidebarSearch::placeholder {
        color: #9ca3af;
    }

#sidebarSearch {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%239ca3af' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 0.5rem center;
    background-size: 1rem;*/
/*padding-left: 2.5rem;*/
/*}*/
/* Sidebar search styling */
.sidebar-search .form-control {
    font-size: 0.9rem;
    /*padding: 0.35rem 0.5rem;*/
    background-color: #f8f9fa;
    border-radius: 0.5rem;
}

.sidebar-search .input-group-text {
    background: transparent;
    font-size: 1rem;
    /*padding: 0 0.25rem;*/
}

.sidebar-search button {
    background: transparent !important;
    /*padding: 0 0.25rem;*/
}
div#sidebar {
    height: 100%;
}

/* Mobile optimization: smaller spacing */
@media (max-width: 768px) {
    .sidebar-search {
        margin-bottom: 0.25rem;
    }

        .sidebar-search .form-control {
            font-size: 0.85rem;
            /*padding: 0.25rem 0.4rem;*/
        }

        .sidebar-search .input-group-text i {
            font-size: 0.9rem;
        }

        .sidebar-search button i {
            font-size: 0.9rem;
        }
        .sidebar-header{
            display:block;
        }
}
@media(min-width:768){
    #mobileCloseBtn{
        display:none!important;
    }
}


/* Base button style */
.save-btn, #newBtn, #updateBtn, #deleteBtn {
    transition: all 0.25s ease-in-out;
    font-weight: 500;
    border-radius: 0.45rem;
    padding: 0.375rem 0.9rem;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    cursor: pointer;
}

/* Enabled states */

/* Save Button */
#btnSave.enabled {
    background: linear-gradient(135deg, #0d6efd, #6610f2);
    color: #fff;
    border: none;
    box-shadow: 0 4px 10px rgba(13, 110, 253, 0.3);
}

    #btnSave.enabled:hover {
        background: linear-gradient(135deg, #6610f2, #0d6efd);
        box-shadow: 0 6px 12px rgba(13, 110, 253, 0.4);
        transform: translateY(-1px);
    }

/* New Button */
#newBtn.enabled {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: #fff;
    border: none;
    box-shadow: 0 4px 10px rgba(40, 167, 69, 0.3);
}

    #newBtn.enabled:hover {
        background: linear-gradient(135deg, #20c997, #28a745);
        box-shadow: 0 6px 12px rgba(40, 167, 69, 0.4);
        transform: translateY(-1px);
    }

/* Update Button */
#updateBtn.enabled {
    background: linear-gradient(135deg, #ffc107, #fd7e14);
    color: #fff;
    border: none;
    box-shadow: 0 4px 10px rgba(255, 193, 7, 0.3);
}

    #updateBtn.enabled:hover {
        background: linear-gradient(135deg, #fd7e14, #ffc107);
        box-shadow: 0 6px 12px rgba(255, 193, 7, 0.4);
        transform: translateY(-1px);
    }

/* Delete Button */
#deleteBtn.enabled {
    background: linear-gradient(135deg, #dc3545, #e83e8c);
    color: #fff;
    border: none;
    box-shadow: 0 4px 10px rgba(220, 53, 69, 0.3);
}

    #deleteBtn.enabled:hover {
        background: linear-gradient(135deg, #e83e8c, #dc3545);
        box-shadow: 0 6px 12px rgba(220, 53, 69, 0.4);
        transform: translateY(-1px);
    }

/* Disabled states */
.save-btn.disabled, #newBtn.disabled, #updateBtn.disabled, #deleteBtn.disabled {
    opacity: 0.65;
    pointer-events: none;
    background: #e9ecef;
    color: #6c757d;
    border: 1px solid #ced4da;
    box-shadow: none;
}
/*  Shared style for all navigation buttons */
#firstBtn,
#prevBtn,
#nextBtn,
#lastBtn {
    font-weight: 500;
    font-size: 0.85rem;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    transition: all 0.25s ease-in-out;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    gap: 0.35rem;
}

    /* Hover state */
    #firstBtn:hover,
    #prevBtn:hover,
    #nextBtn:hover,
    #lastBtn:hover {
        color: #fff;
        background-color: #0d6efd;
        border-color: #0d6efd;
        box-shadow: 0 2px 6px rgba(13, 110, 253, 0.35);
        transform: translateY(-1px);
    }

    /* Active state */
    #firstBtn:active,
    #prevBtn:active,
    #nextBtn:active,
    #lastBtn:active {
        transform: translateY(0px) scale(0.97);
        box-shadow: 0 1px 2px rgba(13, 110, 253, 0.25);
    }

    /* Disabled state */
    #firstBtn:disabled,
    #prevBtn:disabled,
    #nextBtn:disabled,
    #lastBtn:disabled {
        background-color: #f8f9fa !important;
        color: #adb5bd !important;
        border-color: #dee2e6 !important;
        box-shadow: none !important;
        cursor: not-allowed;
    }

    /*  Optional: subtle color accents per button */
    #firstBtn i {
        color: #198754;
    }
    /* green for "الأول" */
    #prevBtn i {
        color: #ffc107;
    }
    /* yellow for "السابق" */
    #nextBtn i {
        color: #0dcaf0;
    }
    /* cyan for "التالي" */
    #lastBtn i {
        color: #d63384;
    }
/* pink for "الأخير" */

/* Responsive adjustments */
@media (max-width: 576px) {
    #firstBtn,
    #prevBtn,
    #nextBtn,
    #lastBtn {
        font-size: 0.75rem;
        padding: 0.25rem 0.6rem;
        gap: 0.25rem;
        border-radius: 4px;
    }
}

#exitmodalbtn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.5rem; /* px-2 py-1 */
    gap: 0.35rem; /* space between icon and text */
    font-size: 0.85rem;
    border-radius: 6px;
    transition: all 0.25s ease-in-out;
    width: fit-content;
}

    /* Hover */
    #exitmodalbtn:hover {
        background-color: #5c636a;
        border-color: #565e64;
        color: #fff;
    }

    /* Active */
    #exitmodalbtn:active {
        transform: scale(0.97);
        box-shadow: 0 1px 3px rgba(0,0,0,0.15);
    }

    /* Disabled */
    #exitmodalbtn:disabled {
        background-color: #e9ecef !important;
        border-color: #dee2e6 !important;
        color: #adb5bd !important;
        cursor: not-allowed;
        opacity: 0.75;
    }
/* Modal Header Gradient */
#permissionsModal .modal-header {
    background: linear-gradient(135deg, #0d6efd, #0a58ca);
}

/* Buttons (common style) */
.permission-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    border-radius: 10px;
    padding: 0.6rem 1rem;
    transition: all 0.25s ease-in-out;
    border: none;
}

    /* Specific Button Colors */
    .permission-btn.btn-update {
        background-color: #e7f1ff;
        color: #0d6efd;
    }

        .permission-btn.btn-update:hover {
            background-color: #0d6efd;
            color: #fff;
        }

    .permission-btn.btn-delete {
        background-color: #fde7e7;
        color: #dc3545;
    }

        .permission-btn.btn-delete:hover {
            background-color: #dc3545;
            color: #fff;
        }

    .permission-btn.btn-grant {
        background-color: #e9f9ee;
        color: #198754;
    }

        .permission-btn.btn-grant:hover {
            background-color: #198754;
            color: #fff;
        }

    .permission-btn.btn-default {
        background-color: #f8f9fa;
        color: #6c757d;
    }

        .permission-btn.btn-default:hover {
            background-color: #6c757d;
            color: #fff;
        }

/* Responsive Adjustments */
@media (max-width: 576px) {
    #permissionsModal .modal-dialog {
        margin: 0.5rem;
    }

    #permissionsModal .modal-body {
        padding: 1rem;
    }

    .permission-btn {
        font-size: 0.85rem;
        padding: 0.5rem;
    }
}
/* Search panel slide effect */
#searchPanel.collapse:not(.show) {
    display: block;
    height: 0;
    overflow: hidden;
    transition: height 0.35s ease;
    padding: 0 !important;
}

#searchPanel.collapse.show {
    height: auto;
    transition: height 0.35s ease;
}



/* Rounded tooltips */
.tooltip-inner {
    border-radius: 10px;
    padding: 6px 12px;
}
/* Card styling */
.user-permissions-card {
    border: none;
    overflow: hidden;
    transition: all 0.3s ease;
}

    .user-permissions-card .card-header {
        border-bottom: none;
    }

.header-gradient {
    background: linear-gradient(120deg, #f4f8fc, #dce6f4);
    border-bottom: 1px solid #c8d4e3;
}

.header-gradient-alt {
    background: linear-gradient(135deg, #e9f0fd, #dce5f7);
    border-bottom: 1px solid #d0d7e1;
}

.icon-secondary {
    opacity: 0.75;
}

/* Buttons inside card header */
.user-permissions-card .btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.6rem;
    font-size: 0.85rem;
    border-radius: 0.4rem;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
}

    .user-permissions-card .btn-icon:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    }

/* Table hover */
.user-permissions-table tbody tr:hover {
    background-color: #f1f5fb;
    transition: background-color 0.2s ease-in-out;
}

/* Switches */
.form-check-input:checked {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .user-permissions-card .card-header h6 {
        font-size: 0.9rem;
    }

    .user-permissions-card .btn-icon {
        font-size: 0.75rem;
        padding: 0.2rem 0.5rem;
    }

    .form-check-label {
        font-size: 0.85rem;
    }
}
/* Footer card buttons */
.footer-buttons .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem; /* Slightly smaller for compact look */
    padding: 0.35rem 0.75rem; /* Reduce padding */
    min-width: 90px; /* Ensure uniform button width */
    border-radius: 0.4rem; /* Smooth rounded corners */
    transition: all 0.2s ease-in-out;
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
}

    .footer-buttons .btn i {
        font-size: 0.95rem; /* Slightly smaller icons */
    }

.footer-buttons .btn-light {
    background: #f8f9fa;
    color: #495057;
}

    .footer-buttons .btn-outline-primary:hover,
    .footer-buttons .btn-outline-secondary:hover,
    .footer-buttons .btn-warning:hover,
    .footer-buttons .btn-danger:hover,
    .footer-buttons .btn-light:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    }

/* Responsive adjustments for mobile */
@media (max-width: 576px) {
    .footer-buttons .btn {
        font-size: 0.8rem;
        padding: 0.3rem 0.6rem;
        min-width: 75px;
    }

    .footer-buttons {
        gap: 0.4rem;
    }
}
/* General read-only state */
.readonly {
    /*background-color: #f9f9f9 !important;*/
    color: #6c757d !important;
    pointer-events: none; /* prevent interaction */
    opacity: 0.85;
}

    /* Disabled input fields */
    .readonly input,
    .readonly select,
    .readonly textarea {
        background-color: #f1f3f5 !important;
        border-color: #dee2e6 !important;
        color: #6c757d !important;
    }

/* Disabled buttons */
button:disabled {
    opacity: 0.6;
    cursor: not-allowed !important;
}

/* Highlight editable row in table */
.table-warning {
    background-color: #fff3cd !important;
}

/* Subtle overlay for whole form when disabled */
.form-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.6);
    z-index: 10;
    border-radius: 8px;
}

.metric-card {
    position: relative;
    overflow: hidden;
    /*transition: transform 0.2s;*/
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

    .metric-card:hover {
        /*transform: translateY(-4px);*/
    }

.icon-circle {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 10px;
    right: 10px;
}

.growth-badge {
    font-size: 0.85rem;
    font-weight: 600;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, #4e73df, #224abe);
}

.bg-gradient-success {
    background: linear-gradient(135deg, #1cc88a, #13855b);
}

.bg-gradient-warning {
    background: linear-gradient(135deg, #f6c23e, #dda20a);
}

.bg-gradient-danger {
    background: linear-gradient(135deg, #e74a3b, #a91d0d);
}

@media (max-width: 767px) {
    .metric-card h3 {
        font-size: 1.2rem;
    }

    .metric-card h6 {
        font-size: 0.85rem;
    }

    .icon-circle {
        width: 30px;
        height: 30px;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

.no-result-msg {
    color: #dc3545; /* Bootstrap red */
    font-size: 0.85rem;
    margin-top: 4px;
    display: none;
    opacity: 1;
    transition: opacity 0.5s ease;
}

    .no-result-msg.fade-out {
        animation: fadeOut 0.5s forwards;
    }

.active-row {
    background-color: #d0ebff !important;
    outline: 2px solid #0d6efd;
}
/* Professional and Attractive Input Field Styling */
.input-attractive {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgb(171 147 147 / 60%)) !important;
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

    .input-attractive:focus {
        border-color: #007bff;
        box-shadow: 0 0 8px rgba(0, 123, 255, 0.4);
        background-color: #ffffff;
    }

/* Disabled Fields */
input:disabled {
    /*background-color: #f5f5f5 !important;*/
    border: 1px solid #ccc !important;
    cursor: not-allowed;
}

#printSanadModal .modal-content {
    border-radius: 1rem !important;
}

#printSanadModal .table th {
    background: #f8f9fb !important;
    color: #333;
    font-weight: 600;
}

#printSanadModal .table td {
    background: #fff;
}

#printSanadModal .modal-body {
    background: linear-gradient(180deg, #f9fafc 0%, #fff 100%);
}

.sanad-header {
    /*background: #fff url('/images/orasoft_watermark.png') center/200px no-repeat;*/
    background-blend-mode: lighten;
    border-radius: 1rem;
}

@media (min-width: 768px) {
    #searchInvoiceModal .modal-dialog {
        max-width: 420px;
    }
}

@media (max-width: 767px) {
    #searchInvoiceModal .modal-dialog {
        width: 92%;
        margin: auto;
    }
}

/*  Compact modal layout */
/*.swal2-popup {
    padding: 1rem !important;
    margin: 0.5rem auto !important;
    width: 320px !important;
}*/

/*  Smaller icons */
/*.swal2-icon {
    width: 2.5em !important;
    height: 2.5em !important;
    margin: 0.5em auto !important;
}

    .swal2-icon .swal2-icon-content {
        font-size: 1.8em !important;
    }*/

/*  Compact buttons */
/*.swal2-actions .btn {
    padding: 0.4rem 0.75rem !important;
    font-size: 0.85rem !important;
}*/

/*  Responsive text */
/*.swal2-title {
    font-size: 1.1rem !important;
}

.swal2-html-container {
    font-size: 0.95rem !important;
}*/
/*  Highlight animation for totals */
@keyframes totalHighlight {
    0% {
        background-color: #fff8e1;
    }

    50% {
        background-color: #fff3cd;
    }

    100% {
        background-color: transparent;
    }
}

.total-highlight {
    animation: totalHighlight 0.8s ease-in-out;
}
/* Responsive Font Sizes */
/*@media (max-width: 768px) {
    .metric-card h4 {
        font-size: 1.1rem;
    }

    .metric-card h6 {
        font-size: 0.7rem;
    }

    .icon-circle {
        width: 1.75rem;
        height: 1.75rem;
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .metric-card h4 {
        font-size: 1rem;
    }

    .metric-card h6 {
        font-size: 0.65rem;
    }

    .icon-circle {
        width: 1.5rem;
        height: 1.5rem;
        font-size: 0.9rem;
    }
}
@media (max-width: 576px) {
    .card-header h5 {
        font-size: 0.9rem;
    }

    #collapseIcon {
        font-size: 0.85rem;
    }

    .btn-sm i {
        font-size: 0.85rem;
    }
}*/
/* Pulse Animation */
@keyframes pulse {
    0%,100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

@media (max-width: 768px) {
    .metric-card h4 {
        font-size: 1.1rem;
    }

    .metric-card h6 {
        font-size: 0.75rem;
    }

    .icon-circle {
        width: 2rem;
        height: 2rem;
        font-size: 1.2rem;
    }
}

@media (max-width: 576px) {
    .metric-card h4 {
        font-size: 1rem;
    }

    .metric-card h6 {
        font-size: 0.7rem;
    }

    .icon-circle {
        width: 1.75rem;
        height: 1.75rem;
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .card-header h5 {
        font-size: 0.9rem;
    }

    #collapseIcon {
        font-size: 0.85rem;
    }

    .btn-sm i {
        font-size: 0.85rem;
    }
}
/* Test*/
.metric-card {
    padding: 0.75rem !important;
    margin: 0 !important;
    border-radius: 1rem !important;
    /*transition: transform 0.25s, box-shadow 0.25s;*/
    cursor: default;
}

    .metric-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 12px 30px rgba(0,0,0,0.18);
    }

.icon-circle {
    width: 2.25rem;
    height: 2.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.3rem;
    transition: all 0.3s;
}

.metric-card:hover .icon-circle {
    background: rgba(255,255,255,0.25);
    transform: scale(1.1);
}

.growth-badge {
    position: absolute;
    bottom: 0.6rem;
    right: 0.6rem;
    font-size: 0.75rem;
    padding: 0.2rem 0.45rem;
    border-radius: 0.5rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    animation: pulse 2s infinite;
}

    .growth-badge.up {
        background-color: rgba(0, 200, 83, 0.85);
        color: #fff;
    }

    .growth-badge.down {
        background-color: rgba(255, 82, 82, 0.85);
        color: #fff;
    }

.metric-card .progress {
    height: 5px;
    border-radius: 2px;
    background: rgba(255,255,255,0.15);
}

.metric-card .progress-bar {
    border-radius: 2px;
    transition: width 1.5s ease-in-out;
}


/* Compact, clean, thermal-style */
#InvoiceNewPrintPreview table th,
#InvoiceNewPrintPreview table td {
    padding: 2px 4px;
    border-color: #ddd !important;
}

#InvoiceNewPrintPreview h6 {
    font-size: 13px;
}

#InvoiceNewPrintPreview .small {
    font-size: 10px;
}
/* Applied when printing on thermal printer */
/*.thermal-mode {
    font-size: 10px;
    line-height: 1.2;
}

    .thermal-mode table th,
    .thermal-mode table td {
        padding: 1px 2px !important;
    }*/
/* Ensure barcode and QR scale nicely */
/*.barcode-qr-container > div {
    flex: 1 1 45%;*/ /* each takes 45% max width */
/*min-width: 120px;*/ /* never too small */
/*margin: 2px;
}

.barcode-qr-container svg,
#qrCodeContainer canvas {
    max-width: 100%;
    height: auto;
}*/

/* Small receipt (58mm) special scaling */
/*@media (max-width: 240px) {
    .barcode-qr-container > div {
        flex: 1 1 100%;*/ /* stack vertically on tiny receipts */
/*}
}*/

@media (max-width: 576px) {
    .dashboard-welcome-card .card-header {
        flex-direction: column;
        text-align: center;
    }

        .dashboard-welcome-card .card-header .btn {
            margin-top: 0.25rem;
        }
}

@media (max-width: 576px) {
    .card-header {
        flex-direction: column;
        align-items: stretch !important;
        text-align: center;
    }

        .card-header .badge {
            width: min-content;
            justify-content: center;
        }

        .card-header .d-flex.flex-wrap {
            justify-content: center;
        }
}

@media (width <= 768px) {
    .btn-primary {
        background-color: #0d6efd;
        border: none;
        border-radius: 6px;
        font-weight: 700;
        padding: 4px 20px !important;
    }
}

/* Compact responsive style */
#generalinfozatca .form-label {
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
}

#generalinfozatca .input-group-text {
    padding: 0.25rem 0.5rem;
}

#generalinfozatca .form-select,
#generalinfozatca .form-control {
    padding: 0.25rem 0.4rem;
    font-size: 0.85rem;
}

#generalinfozatca .response-badge {
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    transition: transform 0.2s ease, filter 0.3s ease;
}

    #generalinfozatca .response-badge:hover {
        filter: brightness(1.05);
        transform: scale(1.03);
    }

@media (max-width: 768px) {
    #generalinfozatca {
        font-size: 0.85rem;
    }

        #generalinfozatca .form-select,
        #generalinfozatca .form-control {
            font-size: 0.8rem;
        }

        #generalinfozatca .row {
            --bs-gutter-x: 0.5rem !important;
        }
}

@media (max-width: 576px) {
    #generalinfozatca {
        padding: 0.5rem !important;
    }

        #generalinfozatca .form-label {
            font-size: 0.75rem;
        }
}

/* ================================
   OraSoft Invoice Responsive Layouts
   ================================ */

/* Compact, clean, thermal-style */
#InvoiceNewPrintPreview table th,
#InvoiceNewPrintPreview table td {
    padding: 2px 2px;
    border-color: #ddd !important;
}

#InvoiceNewPrintPreview h6 {
    font-size: 13px;
}

#InvoiceNewPrintPreview .small {
    font-size: 9px;
}

/* Ensure barcode and QR scale nicely */
/*.barcode-qr-container > div {
    flex: 1 1 45%;*/ /* each takes 45% max width */
/*min-width: 120px;*/ /* never too small */
/*margin: 2px;
}

.barcode-qr-container svg,
#qrCodeContainer canvas {
    max-width: 100%;
    height: auto;
}*/

/* Small receipt (58mm) special scaling */
/*@media (max-width: 240px) {
    .barcode-qr-container > div {
        flex: 1 1 100%;*/ /* stack vertically on tiny receipts */
/*}
}*/



@media (max-width: 573px) {
    .card-header {
        /*flex-direction: column;*/
        /*align-items: stretch !important;*/
        text-align: center;
    }

        .card-header .badge {
            width: min-content;
            justify-content: center;
        }

        .card-header .d-flex.flex-wrap {
            justify-content: center;
        }
}

@media (width <= 768px) {
    .btn-primary {
        background-color: #0d6efd;
        border: none;
        border-radius: 3px;
        font-weight: 700;
        padding: 2px 20px !important;
    }
}


/* ================================
   OraSoft Invoice Responsive Layouts
   ================================ */

/*  Default (A4 / Desktop) */
#InvoiceNewPrintPreview {
    /*font-family: 'Cairo', sans-serif;*/
    color: #000;
}

    #InvoiceNewPrintPreview .card {
        border: none;
        border-radius: 1rem;
        box-shadow: 0 1px 3px rgba(0,0,0,0.08);
        /*margin-bottom: .75rem;*/
    }

    #InvoiceNewPrintPreview .card-header {
        background: linear-gradient(90deg, #0d6efd, #0b5ed7);
        color: #fff;
        font-weight: 600;
        font-size: 12px;
        padding: 3px 10px;
        border-top-left-radius: 1rem;
        border-top-right-radius: 1rem;
    }

    #InvoiceNewPrintPreview .card-body {
        padding: 3px 10px;
    }

/* ================================
    80mm Layout (Medium Receipts)
   ================================ */

/*  Shared layout classes */
.receipt-80mm,
.a5-layout {
    /* Compact base styles */
    font-size: 10px !important;
    line-height: 1.2 !important;
}

    .receipt-80mm *,
    .a5-layout * {
        font-size: 10px !important;
        line-height: 1.2 !important;
    }

    /*  Full-width blocks */
    .receipt-80mm .col-lg-2,
    .receipt-80mm .col-lg-10,
    .receipt-80mm .col-12,
    .a5-layout .col-lg-2,
    .a5-layout .col-lg-10,
    .a5-layout .col-12,
    .receipt-80mm #dateandtime,
    .a5-layout #dateandtime {
        width: 100% !important;
        flex: 0 0 100% !important;
        text-align: center;
        padding-left: 2px !important;
        padding-right: 2px !important;
        margin-bottom: 3px;
    }

    /*  Two-column layout */
    .receipt-80mm .col-md-6,
    .receipt-80mm .col-md-3,
    .receipt-80mm .col-6,
    .receipt-80mm #invoiceHeader > div,
    .receipt-80mm #p_NOs,
    .receipt-80mm #fS_DATEs,
    .receipt-80mm #discounts,
    .receipt-80mm #invoiceTitles,
    .receipt-80mm #fwatirTypeTexts,
    .receipt-80mm #fwatirPoxTexts,
    .receipt-80mm #activitiesListTexts,
    .a5-layout .col-md-6,
    .a5-layout .col-md-3,
    .a5-layout .col-6,
    .a5-layout #invoiceHeader > div,
    .a5-layout #p_NOs,
    .a5-layout #fS_DATEs,
    .a5-layout #discounts,
    .a5-layout #invoiceTitles,
    .a5-layout #fwatirTypeTexts,
    .a5-layout #fwatirPoxTexts,
    .a5-layout #activitiesListTexts {
        width: 50% !important;
        flex: 0 0 50% !important;
        padding-left: 2px !important;
        padding-right: 2px !important;
        margin-bottom: 2px !important;
        text-align: center;
    }

    /*  Card stacking */
    .receipt-80mm .col-md-8,
    .receipt-80mm .col-md-4,
    .receipt-80mm .col-8,
    .a5-layout .col-md-8,
    .a5-layout .col-md-4,
    .a5-layout .col-8 {
        width: 100% !important;
        flex: 0 0 100% !important;
        margin-bottom: 3px !important;
        padding-left: 2px !important;
        padding-right: 2px !important;
        text-align: center;
    }

    /*  Compact card body */
    .receipt-80mm .card-body,
    .a5-layout .card-body {
        padding: 2px !important;
    }

    /*  Compact input groups and labels */
    .receipt-80mm .form-label,
    .receipt-80mm .form-control,
    .receipt-80mm .input-group-text,
    .a5-layout .form-label,
    .a5-layout .form-control,
    .a5-layout .input-group-text {
        font-size: 10px !important;
        padding: 2px 2px !important;
        margin-bottom: 2px !important;
    }

    /*  Prevent wrapping inside input groups */
    .receipt-80mm .input-group,
    .a5-layout .input-group {
        flex-wrap: nowrap !important;
    }

    /*  Centered notes and address */
    .receipt-80mm .text-center,
    .a5-layout .text-center {
        font-size: 9px !important;
        margin-top: 2px !important;
    }

    /*  Ensure wrapping inside rows */
    .receipt-80mm #invoiceHeader,
    .a5-layout #invoiceHeader {
        flex-wrap: wrap !important;
    }

.a4-layout {
    width: 595px !important;
    margin: 0 auto;
    font-size: 11px;
}

    .a4-layout .form-label,
    .a4-layout .form-control,
    .a4-layout .input-group-text {
        font-size: 12px !important;
        padding: 2px 2px !important;
        line-height: 1.4 !important;
    }

#InvoiceNewPrintArea .a4-layout {
    background: white;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    padding: 13px;
    border-radius: 3px;
}

.a4-layout .col-md-8,
.a4-layout .col-8 {
    width: 70% !important;
    flex: 0 0 70% !important;
    margin-bottom: 2px !important;
    padding-left: 1px !important;
    padding-right: 1px !important;
}

.a4-layout .col-md-4,
.a4-layout .col-4 {
    width: 30% !important;
    flex: 0 0 30% !important;
    margin-bottom: 2px !important;
    padding-left: 1px !important;
    padding-right: 1px !important;
}


/* ================================
   General Thermal Mode
   ================================ */

/*  Base thermal-mode font and spacing */
.thermal-mode * {
    font-size: 9px !important;
    line-height: 1.1 !important;
}
/*.thermal-mode .hr, .a4-layout .hr, .receipt-80mm .hr,
.a5-layout .hr {
    margin: unset !important;
}*/
.thermal-mode hr, .a4-layout hr, .receipt-80mm hr,
.a5-layout hr {
    margin-bottom: 3px !important;
    margin-top: 3px !important;
}
/*  Ensure .row containers are flex */
.thermal-mode .row {
    display: flex !important;
    flex-wrap: wrap !important;
}

/*  Two-column layout for fields */
.thermal-mode #detailstawrids > div,
.thermal-mode #detailAccounts > div,
.thermal-mode #invoiceHeader > div {
    width: 50% !important;
    flex: 0 0 50% !important;
    padding-left: 2px !important;
    padding-right: 2px !important;
    margin-bottom: 2px !important;
}

/*  Full-width blocks */
.thermal-mode #dateandtime,
.thermal-mode .col-12 {
    width: 100% !important;
    flex: 0 0 100% !important;
}

/*  Compact input groups */
.thermal-mode .form-label,
.thermal-mode .form-control,
.thermal-mode .input-group-text {
    font-size: 9px !important;
    padding: 2px 2px !important;
    line-height: 1.2 !important;
    margin-bottom: 2px !important;
}

/* Prevent wrapping inside input groups */
.thermal-mode .input-group {
    flex-wrap: nowrap !important;
}

/*  Card body spacing */
.thermal-mode .card-body {
    padding: 2px !important;
}

/*  Logo and header stacking */
.thermal-mode .col-lg-2,
.thermal-mode .col-lg-10 {
    width: 100% !important;
    flex: 0 0 100% !important;
    text-align: center;
    margin-bottom: 3px;
}

.receipt-80mm .col-lg-2,
.a5-layout .col-lg-10,
.receipt-80mm #storeImageblock,
.a5-layout #storeImageblock {
    width: 100% !important;
    flex: 0 0 100% !important;
    text-align: center;
    margin-bottom: 8px !important;
    margin-top: 8px !important;
}
/* Apply full width to all column classes inside thermal-mode */


/* ================================
    A4 Full Layout
   ================================ */
#InvoiceNewPrintPreview.a4-layout {
    width: 595px;
    font-size: 13px;
}

    #InvoiceNewPrintPreview.a4-layout .card {
        box-shadow: 0 2px 3px rgba(0,0,0,0.1);
        margin-bottom: 1rem;
    }

    #InvoiceNewPrintPreview.a4-layout .card-header {
        font-size: 15px;
        padding: 8px 12px;
    }

/* Table Styles */
#purchaseItemsTable th {
    background: linear-gradient(90deg, #f0f4ff, #dbe4ff);
    font-weight: 600;
    color: #333;
}

#purchaseItemsTable td {
    background: #f9f9f9;
    border-radius: 0.3rem;
    padding: 6px 8px;
}

#purchaseItemsTable tbody tr {
    transition: transform 0.2s, box-shadow 0.2s;
    margin-bottom: 3px;
}

    #purchaseItemsTable tbody tr:hover {
        transform: translateY(-1px);
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }

/* Mobile Card Styles */
#purchaseItemsCardView .card-label {
    font-weight: 600;
    color: #555;
    font-size: 0.85rem;
}

#purchaseItemsCardView .card-value {
    font-weight: 700;
    color: #000;
    font-size: 0.9rem;
}

#purchaseItemsCardView .card {
    border: 1px solid #e3e3e3;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}


/* 🌙 Sidebar Container */
.sidebar {
    /*width: 250px;*/
    height: 100vh;
    background: linear-gradient(180deg, #212b52 0%, #1a1f3d 100%);
    color: #fff;
   /* position: fixed;
    top: 0;
    left: 0;
    box-shadow: 3px 0 10px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease-in-out;
    border-top-right-radius: 16px;
    border-bottom-right-radius: 16px;
    overflow: hidden;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    justify-content: space-between;*/
}

/* 🪩 Logo */
.sidebar-logo {
    text-align: center;
    padding: 20px 0 10px;
}

    .sidebar-logo img {
        max-width: 140px;
        transition: transform 0.3s ease, max-width 0.3s ease;
    }

        .sidebar-logo img:hover {
            transform: scale(1.05);
        }

/* 🧭 Navigation */
.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
    flex-grow: 1;
}

.sidebar-nav-item {
    margin-bottom: 6px;
}

.sidebar-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #d1d5f0;
    padding: 10px 18px;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.25s ease;
    font-weight: 500;
    font-size: 0.95rem;
    white-space: nowrap;
}

    .sidebar-nav-link i {
        width: 22px;
        font-size: 1.1rem;
        text-align: center;
        color: #9fb2ff;
        transition: color 0.3s ease;
    }

    /* 💡 Hover & Active */
    .sidebar-nav-link:hover {
        background: rgba(255, 255, 255, 0.12);
        /*color: #fff;*/
        /*transform: translateX(4px);*/
    }

        .sidebar-nav-link:hover i {
            color: #fff;
        }

    .sidebar-nav-link.active {
        background: linear-gradient(90deg, #5667ff 0%, #3b4cd1 100%);
        color: #fff;
        box-shadow: 0 2px 8px rgba(86, 103, 255, 0.45);
    }

        .sidebar-nav-link.active i {
            color: #fff;
        }

/* ⚙️ Footer Buttons */
.sidebar-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding: 15px 10px 10px;
    text-align: center;
}

    .sidebar-footer button {
        background: transparent;
        border: none;
        color: #d1d5f0;
        padding: 8px 12px;
        border-radius: 8px;
        width: 100%;
        transition: all 0.25s ease;
        font-size: 0.9rem;
    }

        .sidebar-footer button:hover {
            background: rgba(255, 255, 255, 0.12);
            color: #fff;
        }

    /* ✨ Footer Email */
    .sidebar-footer .text-muted {
        color: rgba(255, 255, 255, 0.6) !important;
        font-size: 0.8rem;
    }

/* 🌐 Collapsed State */
.sidebar.collapsed {
    width: 80px;
}

    .sidebar.collapsed .sidebar-logo img {
        max-width: 45px !important;
    }

    .sidebar.collapsed .sidebar-nav-link span,
    .sidebar.collapsed .sidebar-footer span {
        display: none;
    }

    .sidebar.collapsed .sidebar-nav-link {
        justify-content: center;
        padding: 10px 0;
    }

    .sidebar.collapsed .sidebar-footer button {
        justify-content: center;
    }

/* 📱 Responsive — Auto Collapse */
@media (max-width: 992px) {
    .sidebar {
        position: fixed;
        left: -250px;
        transition: all 0.35s ease;
    }

        .sidebar.active {
            left: 0;
        }

 /*   .main-content {
        margin-left: 0 !important;
    }*/
}

/*  Main Content */
/*.main-content {
    margin-left: 250px;*/ /* match sidebar width */
    /*transition: margin-left 0.3s ease-in-out;
}

.sidebar.collapsed ~ .main-content {
    margin-left: 80px;
}*/

/*  Toggle Button */
#btnToggleSidebar {
    background: transparent;
    border: none;
    color: #5667ff;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

    #btnToggleSidebar:hover {
        color: #3b4cd1;
        transform: scale(1.1);
    }


/*  Elegant Modal Styling */
.elegant-modal {
    backdrop-filter: blur(6px);
    background: #fff;
}

/*  Modern Cards */
.modern-card {
    border: 1px solid #e3e6f0;
    border-radius: 14px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

    .modern-card .card-header {
        background: #f8f9fc;
        border-bottom: 1px solid #e3e6f0;
        color: #2f3a68;
        font-weight: 600;
        display: flex;
        align-items: center;
    }

/*  Compact Inputs */
.small-space .form-label {
    font-size: 0.85rem;
    margin-bottom: 2px;
}

.small-space .form-control,
.small-space .form-select {
    font-size: 0.85rem;
    padding: 4px 8px;
}

.small-space .form-check {
    margin-bottom: 4px;
}

.small-scroll {
    max-height: 150px;
    overflow-y: auto;
}

/*  Buttons */
.btn {
    border-radius: 8px;
}

.btn-sm {
    padding: 4px 10px;
    font-size: 0.85rem;
}

/*  Header Gradient */
.modal-header.bg-gradient {
    background: linear-gradient(90deg, #3b4cd1, #5667ff);
}

.submenu {
    display: none;
    transition: all 0.3s ease;
}

.sidebar-item.active .submenu {
    display: block;
}

.chevron-icon {
    transition: transform 0.3s ease;
}

.sidebar-item.active .chevron-icon {
    transform: rotate(180deg);
}
/* 🔮 Purple Gradient Background */
.bg-purple {
    background: linear-gradient(135deg, #6f42c1, #8e44ad);
    color: #fff;
}

/* 🌫️ Optional Blur and Opacity Enhancements */
.bg-opacity-75 {
    background-color: rgba(111, 66, 193, 0.75) !important;
}

.backdrop-blur {
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

/* 🧱 Modal Header Styling */
.modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 1rem 1.25rem;
    border-top-left-radius: 0.75rem;
    border-top-right-radius: 0.75rem;
}

/* 🏷️ Title Styling */
.modal-title {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* ❌ Close Button Styling */
.modal-header .btn {
    background-color: #fff;
    color: #6f42c1;
    transition: all 0.3s ease;
}

    .modal-header .btn:hover {
        background-color: #f8f9fa;
        color: #5a379e;
    }

/* 📱 Responsive Icon/Text Alignment */
.modal-title i {
    font-size: 1.2rem;
    color: #ffffff;
}

.item-name-label {
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.badge {
    font-size: 0.9rem;
    padding: 0.25em 0.35em;
    border-radius: 0.5rem;
    font-weight: 600;
/*    min-width: 70px;*/
    text-align: center;
}
    /* ✅ Subtle background style for badges */
    .badge.bg-success-subtle {
        background-color: #d1e7dd;
        color: #198754 !important;
    }

    .badge.bg-danger-subtle {
        background-color: #f8d7da;
        color: #dc3545 !important;
    }

    .badge.border {
        background-clip: padding-box;
    }

.badge {
    transition: all 0.25s ease-in-out;
}

    .badge:hover {
        transform: scale(1.05);
        box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);
    }
/* ✅ Professional button icon style for tables */
.btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50% !important;
    transition: all 0.2s ease-in-out;
}

    /* 🧭 Hover + focus effects */
    .btn-icon:hover, .btn-icon:focus {
        transform: translateY(-2px);
        box-shadow: 0 3px 6px rgba(0, 0, 0, 0.08);
    }

    /* ✨ Make icons visually balanced */
    .btn-icon i {
        font-size: 0.9rem;
    }

/* ⚡ Responsive layout: space out on small screens */
@media (max-width: 768px) {
    td .d-flex.flex-wrap {
        gap: 0.4rem !important;
    }
}

/* permits filtering */
/* Grid container */
/* ------------------------------
   DESKTOP (Default)
   ------------------------------ */
#cardsGrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
}

/* ------------------------------
   TABLET (Medium screens < 992px)
   Use controlled 2-column layout
   ------------------------------ */
@media (max-width: 992px) {
    #cardsGrid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.85rem;
    }
}

/* ------------------------------
   MOBILE (Small screens < 576px)
   Disable grid completely for
   perfect stacking & readability
   ------------------------------ */
@media (max-width: 576px) {
    #cardsGrid {
        display: block !important;
        grid-template-columns: none !important;
        gap: 0 !important;
    }

        #cardsGrid > * {
            margin-bottom: 0.75rem;
        }
}


/* Card style */
.permit-card-wide {
    background: #fff;
    border-radius: 10px;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    flex-direction: column;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    cursor: pointer;
    /*transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;*/
    border-left: 5px solid var(--bs-success);
    border-bottom: 5px solid var(--bs-success);
}

    .permit-card-wide:hover {
        /*transform: translateY(-3px);*/
        box-shadow: 0 6px 16px rgba(0,0,0,0.15);
    }

/* Left Info */
.left-info {
    margin-bottom: 0.5rem;
}

    .left-info .fw-semibold {
        font-size: 1rem;
        display: flex;
        align-items: center;
        gap: 0.3rem;
    }

        .left-info .fw-semibold i {
            font-size: 1.1rem;
        }

/* Right Info */
.right-info {
    font-size: 0.85rem;
    color: #6c757d;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

/* Badges */
.badge {
    font-size: 0.75rem;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
}

/* Status Colors */
.permit-status-requested {
    border-left-color: #ffc107;
    border-bottom-color: #ffc107;
}

.permit-status-approving {
    border-left-color: #17a2b8;
    border-bottom-color: #17a2b8;
}

.permit-status-active {
    border-left-color: #28a745;
    border-bottom-color: #28a745;
}

.permit-status-request_close {
    border-left-color: #fd7e14;
    border-bottom-color: #fd7e14;
}

.permit-status-closed {
    border-left-color: #6c757d;
    border-bottom-color: #6c757d;
}

/* Filters */
.filters-bar .form-label {
    font-size: 0.75rem;
    font-weight: 600;
}

.filters-bar select,
.filters-bar input {
    min-width: 120px;
}

/* Date highlight */
.right-info .date-range {
    font-weight: 500;
}

.date-expired {
    color: #dc3545;
    font-weight: 600;
}

.date-soon {
    color: #fd7e14;
    font-weight: 600;
}

.date-active {
    color: #28a745;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .filters-bar {
        flex-direction: column;
        align-items: stretch;
    }

        .filters-bar > div {
            width: 100%;
        }
}

.timeline {
    border-left: 3px solid #dee2e6;
    padding-left: 0.75rem;
}

    .timeline .border-bottom:last-child {
        border-bottom: none !important;
    }

    .timeline i {
        transition: transform 0.2s ease, color 0.3s ease;
    }

        .timeline i:hover {
            transform: scale(1.15);
        }

.arabic-text {
    font-weight: 500;
    direction: rtl;
}
.note-item, .notif-item {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}
#notesList, #notifList {
    max-height: 250px;
    overflow-y: auto;
    scrollbar-width: thin;
}
/* Make this modal always on top of any open modal */
.note-modal {
    z-index: 99999 !important;
}

/* Input group improvements */
.input-group-text {
    border: none;
    border-right: 1px solid #e0e0e0;
}

.form-control {
    border: none;
    border-radius: 0 8px 8px 0;
    box-shadow: none !important;
}

    .form-control:focus {
        border-color: #4CAF50;
        box-shadow: 0 0 4px rgba(76, 175, 80, 0.4);
    }

/* Modal content styling */
.modal-content {
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease-in-out;
}

    .modal-content:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    }

/* ===========================
   Global Responsive Styles
=========================== */
@media (max-width: 768px) {
    #noteForm {
        flex-direction: column;
    }

    .col-md-4 {
        width: 100%;
    }

    .accordion-button {
        font-size: 0.9rem;
        padding: 0.6rem 1rem;
    }

    .input-group-text {
        font-size: 0.85rem;
    }
}

@media (max-width: 576px) {
    .accordion-button {
        font-size: 0.9rem;
    }

    .accordion-body .row {
        flex-direction: column;
    }
}

/* ===========================
   Accordion Styling
=========================== */
.accordion-item {
    border-radius: .5rem;
    margin-bottom: 12px;
}

.accordion-button {
    font-weight: 600;
    border-radius: .5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    background: #f8f9fa;
    padding: 0.45rem 0.75rem !important;
    transition: background 0.2s, transform 0.2s;
}

    .accordion-button:hover {
        transform: translateY(-2px);
        background-color: #f1f3f5;
    }

    .accordion-button:not(.collapsed) {
        background: #e8f0fe;
        color: #0d6efd;
    }

.accordion-body {
    padding: 0.75rem;
    background: #fff;
    border-left: 3px solid #0d6efd15;
}

.form-label {
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

/* ===========================
   Input & Form Elements
=========================== */
.input-group-text {
    background-color: #f8f9fa;
    border-radius: .375rem;
    transition: color 0.3s;
}

    .input-group-text i {
        transition: color 0.3s;
    }

    .input-group-text:hover i {
        color: var(--bs-primary);
    }

textarea.form-control,
input.form-control {
    border-radius: .375rem;
    font-size: 0.85rem;
    resize: none;
}

.input-group-sm .form-control,
.input-group-sm .input-group-text {
    font-size: 0.85rem;
}

/* ===========================
   Compact Form Blocks
=========================== */
.sequence-item,
.activity-item {
    margin-bottom: 10px;
}

    .sequence-item .form-label,
    .activity-item .form-label {
        font-size: 0.85rem;
        margin-bottom: 4px;
    }

    .sequence-item .form-control,
    .activity-item .form-control,
    .sequence-item .form-select,
    .activity-item .form-select {
        padding: 4px 8px;
        font-size: 0.85rem;
    }

    .sequence-item .input-group-text,
    .activity-item .input-group-text {
        padding: 4px 8px;
    }

    .sequence-item .btn-sm,
    .activity-item .btn-sm {
        padding: 4px 8px;
        font-size: 0.75rem;
    }

/* ===========================
   Buttons
=========================== */
.btn-sm {
    border-radius: .375rem;
}

.btn-outline-info:hover,
.btn-outline-primary:hover,
.btn-outline-danger:hover {
    color: #fff !important;
}

.select-btn {
    border-radius: 0 .25rem .25rem 0;
    transition: transform 0.2s;
}

    .select-btn:hover i {
        transform: scale(1.1);
    }

/* ===========================
   Hover & Card Effects
=========================== */
.activity-item:hover,
.sequence-item:hover {
    transform: scale(1.005);
}

.card {
    background-color: #fff;
}

/* ===========================
   Dark Modal Theme
=========================== */
.dark-modal {
    background-color: #1f1f2e !important;
    color: #f0f0f0 !important;
}

    .dark-modal .form-label {
        font-weight: 500;
    }

    .dark-modal .input-group-text,
    .dark-modal .form-control {
        background-color: #2a2a3c;
        color: #f0f0f0;
        border: 1px solid #444;
    }

        .dark-modal .form-control:focus {
            background-color: #2a2a3c;
            color: #fff;
            border-color: #5a5aff;
            box-shadow: 0 0 5px rgba(90,90,255,0.5);
        }

    .dark-modal .btn-primary {
        background: linear-gradient(45deg, #4CAF50, #2E7D32);
        border: none;
    }

        .dark-modal .btn-primary:hover {
            background: linear-gradient(45deg, #2E7D32, #4CAF50);
        }

    .dark-modal .btn-success {
        background: linear-gradient(45deg, #388E3C, #66BB6A);
        border: none;
    }

        .dark-modal .btn-success:hover {
            background: linear-gradient(45deg, #66BB6A, #388E3C);
        }

    .dark-modal .btn-outline-light {
        border-color: #888;
        color: #f0f0f0;
    }

        .dark-modal .btn-outline-light:hover {
            background-color: #444;
            border-color: #fff;
        }

/* ===========================
   Navigation Pills
=========================== */
.nav-pills .nav-link {
    color: #888;
    font-weight: 500;
    border-radius: .5rem;
    transition: background 0.2s, transform 0.2s;
}

    .nav-pills .nav-link:hover {
        background-color: #e6f4ea;
        transform: translateY(-2px);
    }

    .nav-pills .nav-link.active {
        background: linear-gradient(90deg, #4CAF50, #45A049);
        color: #fff;
    }

/* ===========================
   Tables & Misc
=========================== */
.dataTables_wrapper .dataTables_filter input {
    border-radius: 50px;
    padding: 5px 12px;
    border: 1px solid #ccc;
}

.table th {
    font-weight: 600;
    font-size: 0.9rem;
}

.table td {
    font-size: 0.9rem;
}

/* ===========================
   RTL Support
=========================== */
.arabic-text {
    direction: rtl;
    text-align: right;
}

/* ===========================
   Background Utilities
=========================== */
.bg-gradient-primary {
    background: linear-gradient(90deg, #4e73df 0%, #224abe 100%);
}

.input-group-sm .form-control {
    font-size: 0.85rem;
    padding: 0.35rem 0.5rem;
}

.input-group-sm .btn i {
    transition: transform 0.2s, color 0.2s;
}

.input-group-sm .btn:hover i {
    transform: scale(1.1);
    color: var(--bs-white);
}

.img-thumbnail {
    transition: all 0.3s ease;
}

    .img-thumbnail:hover {
        transform: scale(1.05);
        box-shadow: 0 0 6px rgba(0, 0, 0, 0.25);
    }
.upload-box {
    border: 2px dashed #cdd6e1;
    border-radius: 10px;
    text-align: center;
    padding: 18px;
    background: #f8fafc;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
}

    .upload-box:hover {
        border-color: #4CAF50;
        background: #f0fdf4;
    }

    .upload-box.drag-over {
        border-color: #2e7d32;
        background: #e8f5e9;
        transform: scale(1.02);
    }

.upload-icon {
    font-size: 1.8rem;
    color: #4CAF50;
    margin-bottom: 6px;
}

.preview-container {
    position: relative;
    display: inline-block;
}

.preview-img {
    max-height: 80px;
    width: 100%;
    border-radius: 8px;
    margin-top: 6px;
    box-shadow: 0 0 4px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
}

    .preview-img:hover {
        transform: scale(1.05);
    }

.remove-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #dc3545;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.2s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.preview-container:hover .remove-btn {
    opacity: 1;
    transform: scale(1.05);
}

.remove-btn:hover {
    background: #b02a37;
}

@media (max-width: 768px) {
    .upload-box {
        padding: 14px;
    }

    .upload-icon {
        font-size: 1.5rem;
    }

    .preview-img {
        max-height: 70px;
    }
}
/* Compact & modern look */
#requirementsTable th, #requirementsTable td {
    padding: 0.4rem 0.3rem !important;
    vertical-align: middle;
}

#requirementsTable .input-group-text {
    padding: 0.2rem 0.4rem !important;
    border-radius: 0.25rem 0 0 0.25rem !important;
}

#requirementsTable .form-control {
    font-size: 0.8rem !important;
    padding: 0.25rem 0.4rem !important;
}

#requirementsTable button.btn-icon {
    padding: 0.25rem 0.35rem !important;
    border-radius: 6px;
    transition: 0.2s;
}

    #requirementsTable button.btn-icon:hover {
        transform: scale(1.1);
    }

#requirementsTable .hover-effect:hover {
    background-color: #f7f9fc;
}

/* Responsive */
@media (max-width: 768px) {
    #requirementsTable th, #requirementsTable td {
        font-size: 0.75rem;
        padding: 0.3rem !important;
    }

    #requirementsTable .form-control {
        font-size: 0.75rem !important;
    }
}
/* Modal footer compact, elegant, responsive */
.modal-footer {
    background-color: #f9fafb;
    border-top: 1px solid #dee2e6;
    border-radius: 0 0 8px 8px;
}

    .modal-footer .btn {
        font-size: 0.8rem;
        padding: 0.25rem 0.6rem;
        font-weight: 500;
        transition: all 0.2s ease-in-out;
        display: flex;
        align-items: center;
        gap: 0.25rem;
    }

        .modal-footer .btn i {
            font-size: 0.9rem;
        }

        .modal-footer .btn:hover {
            transform: translateY(-2px);
        }

    .modal-footer .btn-outline-primary {
        border-color: #3b82f6;
        color: #2563eb;
    }

        .modal-footer .btn-outline-primary:hover {
            background-color: #3b82f6;
            color: white;
        }

    .modal-footer .btn-success {
        background: linear-gradient(90deg, #16a34a, #22c55e);
        border: none;
        color: #fff;
    }

        .modal-footer .btn-success:hover {
            background: linear-gradient(90deg, #15803d, #16a34a);
        }

    .modal-footer .btn-outline-secondary {
        color: #6c757d;
        border-color: #adb5bd;
    }

        .modal-footer .btn-outline-secondary:hover {
            background-color: #e9ecef;
            color: #495057;
        }

/* Responsive alignment */
@media (max-width: 576px) {
    .modal-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

        .modal-footer .btn {
            width: 100%;
            justify-content: center;
        }
}
.card-header h6 i {
    /*transition: transform 0.3s;*/
}

#toggleSettingsBtn:hover {
    transform: rotate(15deg);
    transition: transform 0.3s;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

.role-switch {
    cursor: pointer;
}

@media(max - width: 768px) {
    .card-header h6 {
        font-size: 0.95rem;
    }

    .btn span {
        display: none;
    }
}
.card {
    /*transition: all 0.3s ease-in-out;*/
}

    .card:hover {
        box-shadow: 0 4px 14px rgba(0,0,0,0.08);
    }

.input-group-text {
    border-radius: 0.5rem 0 0 0.5rem;
}

.form-control, .form-select {
    border-radius: 0 0.5rem 0.5rem 0;
}

.card-body .row > div {
    /*transition: background-color 0.2s;*/
}

    .card-body .row > div:hover {
        /*background-color: #f8f9fa;*/
    }

@media (max-width: 768px) {
    .card-header h6 {
        font-size: 0.9rem;
    }

    .form-label {
        font-size: 0.8rem;
    }
}
/* 🌐 Global Table UI Enhancements */
.hover-row {
    transition: all 0.15s ease-in-out;
}

    .hover-row:hover {
        background-color: #f8f9fa;
        transform: scale(1.01);
    }

/* Compact switch style */
.form-check-input {
    cursor: pointer;
    width: 2.3em;
    height: 1.2em;
}

/* Tooltip style button */
.btn-icon {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

/* Collapse smooth */
.collapse.fade:not(.show) {
    display: none;
}

.collapse.fade.show {
    display: block;
    animation: fadeIn 0.25s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* Child card style */
.child-container {
    background: #f8f9fa;
    border-radius: 0.5rem;
    margin: 0.5rem 1rem;
    padding: 0.75rem 1rem;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    animation: fadeIn 0.25s ease-in-out;
}

/* Title style inside child */
.child-header {
    font-weight: 600;
    color: #444;
    margin-bottom: 0.35rem;
    display: flex;
    align-items: center;
}

/* Rotate animation for chevron */
.rotate {
    transform: rotate(180deg);
    transition: transform 0.3s ease;
}

.rotate-reset {
    transform: rotate(0deg);
    transition: transform 0.3s ease;
}

/* Smooth fade animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        /*transform: translateY(-4px);*/
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive tightening */
@media (max-width: 768px) {
    .child-container {
        padding: 0.6rem;
        margin: 0.4rem;
    }

    table td, table th {
        font-size: 0.85rem;
    }
}
.role-pill {
    transition: all 0.25s ease-in-out;
}

    .role-pill:hover {
        background-color: #f8f9fa;
        transform: scale(1.02);
    }

.role-switch {
    cursor: pointer;
}

[id^="badge_"] {
    transition: all 0.3s ease-in-out;
}

    [id^="badge_"].bg-success-subtle {
        box-shadow: 0 0 5px rgba(25, 135, 84, 0.3);
    }

    [id^="badge_"].bg-danger-subtle {
        box-shadow: 0 0 5px rgba(220, 53, 69, 0.3);
    }
.stacked-modal {
    z-index: 1060 !important;
}
@keyframes fadeInBottom {
    0% {
        transform: translateY(100px);
        opacity: 0;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}
/*dashbord index*/
/* ===== General Dashboard Styles ===== */



/* --- Welcome Card --- */
.dashboard-welcome-card {
    border-radius: 1rem;
    background: linear-gradient(135deg, #4e54c8, #8f94fb);
    color: #fff;
    border: none;
    padding: 0;
}

    .dashboard-welcome-card .card-header {
        background: transparent;
        border: none;
        padding: 0.5rem 1rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
    }

    .dashboard-welcome-card .btn {
        font-size: 0.85rem;
        padding: 0.3rem 0.6rem;
    }

    .dashboard-welcome-card .badge {
        font-size: 0.65rem;
    }

/* --- Counter Cards --- */
.stat-card {
    border-radius: 0.8rem;
    /*transition: 0.3s ease;*/
    padding: 1rem 0.8rem;
    cursor: default;
}

    .stat-card:hover {
        /*transform: translateY(-4px);*/
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
    }

    .stat-card .icon {
        width: 50px;
        height: 50px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0 auto 0.5rem auto;
    }

    .stat-card h4 {
        font-size: 1.25rem;
        margin-bottom: 0.25rem;
    }

/* --- Permit Type Tiles --- */
.permit-type-tile {
    border-radius: 1rem;
    transition: 0.3s ease;
    padding: 1rem;
    background-color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
}

    .permit-type-tile:hover {
        transform: translateY(-5px);
        background-color: #f9f9f9;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    }

    .permit-type-tile .icon-circle {
        width: 60px;
        height: 60px;
        border-radius: 50%;
        display: flex;
        justify-content: center;
        align-items: center;
        margin-bottom: 0.5rem;
    }

/* --- Card Headers & Body --- */
.card {
    border-radius: 0.8rem;
    border: 1px solid #dee2e6;
    margin-bottom: 1rem;
    /*transition: transform 0.25s ease, box-shadow 0.25s ease;*/
}

    .card:hover {
        /*transform: translateY(-3px);*/
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    }

.card-body {
    padding: 0.75rem 1rem;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

/* --- Charts --- */
canvas {
    width: 100% !important;
    height: auto !important;
}

.chart-card {
    padding: 1rem;
    border-radius: 0.8rem;
    border: none;
    background-color: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* --- Typography --- */
h4, h5, h6 {
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.small {
    font-size: 0.75rem;
}

/* --- Buttons --- */
.btn-sm {
    font-size: 0.75rem;
    padding: 0.25rem 0.6rem;
    border-radius: 0.5rem;
}

.start-permit-btn {
    font-size: 0.8rem;
    padding: 0.4rem 0.6rem;
}

/* --- Responsive Adjustments --- */
@media (max-width: 1200px) {
    .permit-type-tile {
        padding: 0.8rem;
    }
}

@media (max-width: 768px) {
    .stat-card h4 {
        font-size: 1.1rem;
    }

    .dashboard-welcome-card .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .dashboard-welcome-card .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.7rem;
    }
}

/* --- Hover & Transition Effects --- */
.toggle-icon {
    transition: transform 0.3s ease;
}

.rotate-180 {
    transform: rotate(180deg);
}

.summary-card h6 {
    font-size: 0.85rem;
    margin-bottom: 0.3rem;
    font-weight: 500;
}

.summary-card h5 {
    font-weight: 700;
    margin: 0;
}
 

@media (min-width: 992px) {
    .container, .container-lg, .container-md, .container-sm {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 15px;
        padding-right: 15px;
        margin-left: auto;
        margin-right: auto;
    }
}

.sidebar {
    width: 250px;
    min-height: 100vh;
    background-color: #fff;
    border-radius: 1rem;
    transition: all 0.3s ease;
}

    .sidebar .logo {
        max-width: 120px;
    }

.sidebar-nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #495057;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

    .sidebar-nav-link span {
        flex: 1;
        text-align: start;
    }

    .sidebar-nav-link i {
        flex-shrink: 0;
    }

    .sidebar-nav-link:hover,
    .sidebar-nav-link.active {
        background-color: #f0f2f5;
        color: #0d6efd;
    }

.has-submenu > .sidebar-nav-link {
    cursor: pointer;
}

.chevron-icon {
    transition: transform 0.3s ease;
    color: #6c757d;
}

.submenu {
    transition: all 0.3s ease;
}

    .submenu a {
        color: #495057;
        font-size: 0.95rem;
    }

        .submenu a:hover {
            background-color: #e9ecef;
        }
/* ===== Full-width Responsive Containers ===== */
/*.container,
.container-sm,
.container-md,
.container-lg,
.container-xl,
.container-xxl {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 15px;
    padding-right: 15px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}*/

/* Optional: Slightly reduce padding on very small screens */
/*@media (max-width: 576px) {
    .container,
    .container-sm,
    .container-md,
    .container-lg,
    .container-xl,
    .container-xxl {
        padding-left: 10px;
        padding-right: 10px;
    }
}*/

/* Optional: Add subtle horizontal gap between columns if using Bootstrap grid */
/*.row {
    --bs-gutter-x: 1rem;*/ /* default 1.5rem, adjust for tighter layout */
    /*--bs-gutter-y: 1rem;
}*/

/* Optional: Smooth max-width for large desktops */
/*@media (min-width: 1200px) {
    .container,
    .container-lg,
    .container-xl,
    .container-xxl {
        max-width: 100% !important;
    }
}*/

#rolesBox.disabled {
    opacity: 0.5;
    pointer-events: none;
}
/* Scrollbar for cards */
#notesList::-webkit-scrollbar,
#notifList::-webkit-scrollbar {
    width: 6px;
}

#notesList::-webkit-scrollbar-thumb,
#notifList::-webkit-scrollbar-thumb {
    background-color: rgba(0,0,0,0.15);
    border-radius: 3px;
}

/* Responsive card adjustments */
@media (max-width: 576px) {
    .card-header h6 {
        font-size: 0.85rem;
    }

    .input-group .form-control {
        font-size: 0.85rem;
    }

    .btn-sm {
        font-size: 0.75rem;
    }
}
/* Timeline styling */
.timeline-item {
    position: relative;
    padding-left: 2rem;
}

    .timeline-item .timeline-badge {
        width: 1.5rem;
        height: 1.5rem;
        border-radius: 50%;
        display: flex;
        justify-content: center;
        align-items: center;
        flex-shrink: 0;
    }

.timeline-content {
    background: #f8f9fa;
    border-radius: 0.5rem;
    padding: 0.35rem 0.5rem;
    transition: background 0.2s ease;
}

    .timeline-content:hover {
        background: #e9ecef;
    }

.notes-timeline::-webkit-scrollbar {
    width: 6px;
}

.notes-timeline::-webkit-scrollbar-thumb {
    background-color: rgba(0,0,0,0.15);
    border-radius: 3px;
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .timeline-item {
        padding-left: 1.5rem;
    }

        .timeline-item .timeline-badge {
            width: 1.2rem;
            height: 1.2rem;
        }

    .timeline-content {
        padding: 0.25rem 0.35rem;
    }

    .btn-sm, .input-group .form-control {
        font-size: 0.8rem;
    }
}
/* Card Styling */
.permit-card {
    border-radius: 0.5rem;
    /*transition: transform 0.2s ease, box-shadow 0.2s ease;*/
}

    .permit-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.1);
    }

    /* Card Header */
    .permit-card .card-header {
        font-size: 0.95rem;
        letter-spacing: 0.5px;
    }

/* Switch Boxes */
.role-switch-box {
    min-width: 160px;
    flex: 1 1 auto;
}

    .role-switch-box .form-check-input {
        cursor: pointer;
        width: 2rem;
        height: 1rem;
    }

    .role-switch-box .form-check-label {
        font-size: 0.875rem;
        cursor: pointer;
        transition: color 0.2s ease;
    }

        .role-switch-box .form-check-label i {
            font-size: 0.9rem;
        }

    /* Hover & Focus */
    .role-switch-box:hover .form-check-label {
        color: #0d6efd;
    }

.form-check-input:checked {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

/* Responsive */
@media (max-width: 576px) {
    .role-switch-box {
        min-width: 140px;
        font-size: 0.85rem;
    }

    .permit-card .card-header {
        font-size: 0.9rem;
    }
}
.permit-card {
    /*transition: all 0.2s ease-in-out;*/
}

    .permit-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    }

.filters-bar select,
.filters-bar input {
    min-width: 100%;
}

@media (max-width: 768px) {
    .filters-bar .input-group-text {
        display: none; /* reduce clutter on mobile */
    }

    .filters-bar label {
        font-size: 0.75rem;
    }

    .filters-bar {
        padding: 0.75rem !important;
    }
}

.filters-bar select, .filters-bar input {
    border-radius: 10px !important;
}

.permit-card {
    cursor: pointer;
    /*transition: all 0.2s ease-in-out;*/
}

    .permit-card:hover {
        /*transform: translateY(-3px);*/
        box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.08);
    }

.input-group-text {
    background-color: #f8f9fa !important;
    border-right: none;
}

.input-group .form-control {
    border-left: none;
}

@media (max-width: 767px) {
    .filters-bar .row > div {
        flex: 0 0 50%;
    }
}

/* ===== Enterprise Approval Card Styling ===== */
.approval-card {
    background: var(--bs-body-bg);
    transition: all 0.3s ease;
}

    .approval-card:hover {
        box-shadow: 0 4px 18px rgba(0, 0, 0, 0.1);
    }

.card-header.bg-gradient {
    background: linear-gradient(90deg, var(--bs-primary-bg-subtle), var(--bs-primary-bg));
    color: var(--bs-primary-text);
    border-bottom: 1px solid var(--bs-border-color-translucent);
}

/* Role Chips */
.role-chip {
    background: var(--bs-white);
    cursor: pointer;
    min-width: 180px;
    transition: all 0.2s ease-in-out;
}

    .role-chip:hover {
        background: var(--bs-light);
        transform: translateY(-2px);
        box-shadow: 0 3px 8px rgba(0,0,0,0.08);
    }

    .role-chip .form-check-input {
        cursor: pointer;
        transform: scale(1.1);
    }

.status-badge {
    font-size: 0.75rem;
    letter-spacing: 0.3px;
    transition: all 0.25s ease;
}

/* Subtle animation */
@media (prefers-reduced-motion: no-preference) {
    .role-chip {
        transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    }

    .form-check-input:checked {
        box-shadow: 0 0 0 0.15rem rgba(var(--bs-success-rgb), 0.25);
    }
}
/* === PRO-STYLE CARD COMPONENTS === */
.pro-card {
    border: 1px solid var(--bs-border-color-translucent);
    border-radius: 1rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    background: linear-gradient(180deg, #fff 0%, #f9fafb 100%);
    display: flex;
    flex-direction: column;
}

.pro-header {
    background: #f8f9fa;
    border-bottom: 1px solid var(--bs-border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.9rem;
}

.pro-badge {
    font-size: 0.7rem;
    font-weight: 600;
}

.pro-scroll {
    max-height: 260px;
    overflow-y: auto;
    scrollbar-width: thin;
}

    .pro-scroll::-webkit-scrollbar {
        width: 6px;
    }

    .pro-scroll::-webkit-scrollbar-thumb {
        background-color: #d0d4da;
        border-radius: 10px;
    }

/* === TIMELINE STYLE === */
.pro-timeline-item {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin-bottom: 0.75rem;
    padding: 0.25rem 0.5rem;
    transition: background 0.2s ease;
    border-radius: 0.6rem;
}

    .pro-timeline-item:hover {
        background-color: #f1f3f5;
    }

.pro-timeline-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 0 0 3px #fff;
}

.pro-timeline-content {
    flex: 1;
}

/* === INPUT BAR === */
.pro-inputbar {
    display: flex;
    align-items: center;
    border-top: 1px solid var(--bs-border-color);
    padding: 0.4rem 0.6rem;
    background-color: #f8f9fa;
    gap: 0.4rem;
}

@media(max-width:768px) {
    .auth-left {
        display: block;
    }

    .auth-card {
        border-radius: 1rem;
    }
}

/* ✅ Balanced Field Box Design */
.field-box {
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    padding: .65rem .75rem;
    height: 100%;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
    transition: all 0.2s ease-in-out;
}

    .field-box:hover {
        border-color: #0d6efd33;
        box-shadow: 0 2px 6px rgba(13,110,253,0.08);
    }

/* ✅ Responsive equal-height rows */
@media (min-width: 768px) {
    #SectionWorkDetails .row > div {
        display: flex;
        flex-direction: column;
    }

    #SectionWorkDetails .field-box {
        flex-grow: 1;
    }
}

/* ✅ Reduce spacing on small screens */
@media (max-width: 576px) {
    #SectionWorkDetails .card-body {
        padding: .75rem;
    }

    #SectionWorkDetails label {
        font-size: .8rem;
    }

    #SectionWorkDetails .form-control,
    #SectionWorkDetails .form-select {
        font-size: .8rem;
    }
}
/* Disabled buttons style */
.footer-btns .disabled-btn {
    pointer-events: none;
    opacity: 0.55;
    background: #e9ecef !important;
    color: #6c757d !important;
    border-color: #dee2e6 !important;
    box-shadow: none !important;
    cursor: not-allowed;
    transition: all 0.3s ease;
}

    .footer-btns .disabled-btn i {
        color: #6c757d !important;
    }

/* Optional: subtle hover effect for non-disabled buttons */
.footer-btns button:not(.disabled-btn):hover,
.footer-btns a:not(.disabled-btn):hover {
    transform: translateY(-1px);
    box-shadow: 0 0.25rem 0.5rem rgba(0,0,0,0.1);
    transition: all 0.2s ease-in-out;
}
/*.icon-round {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .9rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}*/

.bg-primary-subtle {
    background: #e8f1ff !important;
}

.bg-danger-subtle {
    background: #ffe8e8 !important;
}

.bg-success-subtle {
    background: #e8ffef !important;
}

.bg-secondary-subtle {
    background: #f0f0f0 !important;
}

.modal-content {
    animation: fadeSlide .25s ease-out;
}

/*@keyframes fadeSlide {
    from {
        transform: translateY(10px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}
#btnOpenQrModal {
    transition: .2s ease;
}

    #btnOpenQrModal:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    }*/
/* COLORS */
/*.text-area {
    color: #0d6efd;
}

.text-requester {
    color: #6610f2;
}

.text-company {
    color: #198754;
}*/

/* Soft gradient backgrounds */
/*.bg-gradient-area {
    background: linear-gradient(to right, #e7f0ff, #f4f8ff);
    border-left: 3px solid #0d6efd;
}

.bg-gradient-requester {
    background: linear-gradient(to right, #f3e8ff, #faf5ff);
    border-left: 3px solid #6610f2;
}

.bg-gradient-company {
    background: linear-gradient(to right, #e9f7ef, #f6fff9);
    border-left: 3px solid #198754;
}*/

/* Smooth hover effect */
/*.info-badge {
    transition: 0.2s ease;
}

    .info-badge:hover {
        transform: translateX(3px);
        box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    }*/
/* Description Color */
/*.text-description {
    color: #fd7e14;*/ /* Bootstrap Orange */
/*}*/

/* Soft gradient background */
/*.bg-gradient-description {
    background: linear-gradient(to right, #fff3e6, #fff9f3);
    border-left: 3px solid #fd7e14;
}*/
/* COMPANY */
/*.text-company {
    color: #0d6efd;
}

.bg-gradient-company {
    background: linear-gradient(to right, #e8f1ff, #f4f8ff);
    border-left: 3px solid #0d6efd;
}*/

/* AREA */
/*.text-area {
    color: #198754;
}

.bg-gradient-area {
    background: linear-gradient(to right, #e9f7f0, #f4fff9);
    border-left: 3px solid #198754;
}*/

/* REQUESTER */
/*.text-requester {
    color: #6f42c1;
}

.bg-gradient-requester {
    background: linear-gradient(to right, #f3e9ff, #faf4ff);
    border-left: 3px solid #6f42c1;
}*/

/* DESCRIPTION */
/*.text-description {
    color: #fd7e14;
}

.bg-gradient-description {
    background: linear-gradient(to right, #fff3e6, #fff9f3);
    border-left: 3px solid #fd7e14;
}*/

/* DATE CARDS */
/*.date-card {
    transition: 0.25s ease-in-out;
}

    .date-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 4px 10px rgba(0,0,0,0.12);
    }*/
/* SMALLER TEXT FOR MOBILE */
.small {
    font-size: 0.78rem !important;
}

.tiny {
    font-size: 0.68rem !important;
}

/* MINIMAL SHADOW */
.shadow-xs {
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* INFO BADGES */
.info-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    transition: 0.2s ease;
}

    .info-badge:hover {
        transform: translateX(2px);
    }

/* COMPANY */
.text-company {
    color: #0d6efd;
}

.bg-gradient-company {
    background: linear-gradient(to right, #e8f1ff, #f4f8ff);
    border-left: 3px solid #0d6efd;
}

/* AREA */
.text-area {
    color: #198754;
}

.bg-gradient-area {
    background: linear-gradient(to right, #e9f7f0, #f4fff9);
    border-left: 3px solid #198754;
}

/* REQUESTER */
.text-requester {
    color: #6f42c1;
}

.bg-gradient-requester {
    background: linear-gradient(to right, #f3e9ff, #faf4ff);
    border-left: 3px solid #6f42c1;
}

/* DESCRIPTION */
.text-description {
    color: #fd7e14;
}

.bg-gradient-description {
    background: linear-gradient(to right, #fff3e6, #fff9f3);
    border-left: 3px solid #fd7e14;
}

/* DATE CARD */
.date-card {
    transition: 0.2s ease;
}

    .date-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    }
.footer-left .btn,
.footer-right .btn {
    padding: 2px 10px !important;
}

/* Grid Spacing */
#cardsGrid {
    margin-left: -4px;
    margin-right: -4px;
}

    #cardsGrid > .col-lg-6,
    #cardsGrid > .col-md-12,
    #cardsGrid > .col-sm-12,
    #cardsGrid > .col-12 {
        padding-left: 4px;
        padding-right: 4px;
        margin-bottom: 12px;
    }

/* Mobile XS (≤576px) */
@media (max-width: 576px) {
    #cardsGrid > .col-12,
    #cardsGrid > .col-sm-12 {
        width: 100%!important;
        flex: 0 0 100%;
    }
}

/* Tablet MD (577px - 768px) */
@media (min-width: 577px) and (max-width: 768px) {
    #cardsGrid > .col-md-12 {
        width: 100%!important;
        flex: 0 0 100%;
    }
}

/* Desktop LG (769px - 1199px) */
@media (min-width: 769px) and (max-width: 1199px) {
    #cardsGrid > .col-lg-6 {
        width: 50%!important;
        flex: 0 0 50%;
    }
}

/* XL (≥1200px) */
@media (min-width: 1200px) {
    #cardsGrid > .col-lg-6 {
        width: 100%!important;
        flex: 0 0 100%;
    }
}

/* Card Styling */
.permit-card {
    /*transition: all 0.25s ease;*/
    border: 1px solid #e9ecef;
}

    .permit-card:hover {
        /*transform: translateY(-4px);*/
        box-shadow: 0 6px 18px rgba(0,0,0,0.12);
    }

/* Active / Closed Border */
.permit-active {
    border-left: 6px solid #28a745;
}

.permit-closed {
    border-left: 6px solid #dc3545;
}

/* Footer Badge */
.status-badge {
    background: #f8f9fa !important;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    text-transform: uppercase;
}

.permit-active .status-badge {
    color: #28a745;
}

.permit-closed .status-badge {
    color: #dc3545;
}

/* Dropdown button */
button[id^="menuBtn_"] {
    width: 32px;
    height: 32px;
}

/* Icon spacing */
.permit-card i {
    width: 16px;
    text-align: center;
}

/* Hover lift */
.hover-up {
    transition: transform 0.2s, box-shadow 0.25s;
}

    .hover-up:hover {
        transform: translateY(-6px);
    }

/* Clean text */
.permit-card .small {
    line-height: 1.4;
    font-size: .85rem;
}
/* Card hover & border */
.permit-card-modern {
    border: 1px solid #e9ecef;
    border-radius: 1rem;
    /*transition: transform 0.25s ease, box-shadow 0.25s ease;*/
    position: relative;
}

    .permit-card-modern:hover {
        /*transform: translateY(-4px);*/
        box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    }

/* Header */
.card-header-modern {
    background: linear-gradient(135deg, rgba(90,59,234,0.9), rgba(125,92,240,0.9));
    backdrop-filter: blur(6px);
    border-radius: 0.75rem;
    display: flex;
    flex-direction: column;
}

/* Body columns */
.card-body-modern {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.min-w-50 {
    min-width: 48%;
}

/* Info icon groups */
.info-group {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
}

/* Footer */
.card-footer-modern {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Status badges */
.status-badge-modern {
    background: linear-gradient(135deg, #28a745, #198754);
    color: #fff;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    text-transform: uppercase;
}

    .status-badge-modern i {
        font-size: 0.6rem;
        margin-right: 4px;
    }

/* Dropdown button z-index fix */
.z-index-dropdown {
    z-index: 1050 !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .min-w-50 {
        min-width: 100%;
    }

    .card-body-modern {
        gap: 4px;
    }
}
/* Shared section wrapper */
.section-wrapper {
    position: relative;
}

/* Frosted overlay */
.section-overlay {
    position: absolute;
    inset: 0;
    z-index: 50;
    border-radius: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: all;
    transition: opacity .3s ease;
}

/* Message bubble */
.overlay-message {
    background: rgba(255, 255, 255, 0.85);
    padding: 12px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.15);
    color: #5a5a5a;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #e0e0e0;
}

    .overlay-message i {
        color: #dc3545;
        font-size: 1.2rem;
    }

/* Disabled state */
.section-wrapper.disabled * {
    pointer-events: none !important;
}

.section-wrapper.disabled .card,
.section-wrapper.disabled table {
    opacity: 0.55;
}

.section-wrapper.disabled .card-header,
.section-wrapper.disabled .card-body {
    filter: grayscale(40%);
}

/* Always-enabled override */
.section-wrapper.always-enabled * {
    pointer-events: auto !important;
}
.disabled-chip {
    opacity: 0.6;
    pointer-events: none;
}

.timeline-step:hover {
    transform: translateY(-2px);
    transition: 0.2s ease;
}

.action-bar .btn {
    font-size: 0.85rem;
    padding: 0.35rem 0.75rem;
    white-space: nowrap;
    transition: all 0.2s ease-in-out;
}

    .action-bar .btn i {
        font-size: 1rem;
    }

@media (max-width: 576px) {
    .action-bar {
        justify-content: center;
        padding: 0.5rem;
    }

        .action-bar .btn {
            flex: 1 1 auto;
            justify-content: center;
        }
}
#reasonModal .modal-content {
    font-size: 0.9rem;
}

#reasonModal .input-group-text {
    border-right: 0;
}

#reasonModal .form-control {
    border-left: 0;
}
@media print {
    body * {
        visibility: hidden;
    }

    #tabTrends, #tabCircles, #tabSummary {
        visibility: visible;
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }
}
#debugOverlay {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999;
    width: auto;
    max-width: 400px;
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
}
.sidebar-nav-link.active {
    /*background-color: #007bff;*/ /* Bootstrap primary */
    color: #fff !important;
    font-weight: 600;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.2);
}

    .sidebar-nav-link.active i {
        color: #fff !important;
    }

/* ----------------------------------------
   Labels
---------------------------------------- */
.tiny-label {
    font-size: 11px;
    font-weight: 600;
    color: #6c757d;
    margin-bottom: 2px;
}

/* ----------------------------------------
   Input Groups (Compact)
---------------------------------------- */
.input-group-compact .form-control,
.input-group-compact .form-select {
    padding: 4px 6px !important;
    font-size: 13px !important;
    border-radius: 6px;
}

.input-group-compact .input-group-text {
    padding: 3px 6px !important;
}

/* Icon container */
.input-group-text.icon-box {
    width: 42px;
    background: #f5f7fa !important;
    border: 1px solid #e1e4e8 !important;
    border-right: none !important;
    color: #556cd6 !important;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ----------------------------------------
   Card
---------------------------------------- */
.permit-card {
    border-radius: 14px;
    overflow: hidden;
    background: #ffffff;
}

/* ----------------------------------------
   Users Box
---------------------------------------- */
.users-box {
    background: #f8f9fa;
    border: 1px solid #e4e6e9;
    border-radius: 10px;
    padding: 6px;
    max-height: 110px;
    overflow-y: auto;
    font-size: 12px;
}

/* User item */
.user-item {
    padding: 8px;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid #f0f0f0;
    transition: 0.2s;
}

    .user-item:hover {
        background: #f7faff;
        border-color: #cddfff;
    }

/* ----------------------------------------
   Map Box
---------------------------------------- */
.map-box {
    height: 150px;
    border-radius: 10px;
    border: 1px solid #e9ecef;
    overflow: hidden;
    background: #f1f3f5;
}

/* ----------------------------------------
   Textarea
---------------------------------------- */
textarea.form-control {
    resize: none;
}

/* ----------------------------------------
   Info Box
---------------------------------------- */
.info-box {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

/* ----------------------------------------
   Icon Colors
---------------------------------------- */
.icon-company {
    color: #4e73df;
}

.icon-users {
    color: #36b9cc;
}

.icon-desc {
    color: #858796;
}

.icon-start {
    color: #1cc88a;
}

.icon-end {
    color: #e74a3b;
}

.icon-location {
    color: #f6c23e;
}

.icon-dept {
    color: #36b9cc;
}

.icon-area {
    color: #6f42c1;
}
/* --- Atlassian-ish compact theme --- */
.atl-card {
    border-radius: 10px;
    background: #fff;
    border: 1px solid #e6eef8;
    box-shadow: 0 6px 18px rgba(13,38,76,0.04);
    padding: 12px;
}

.atl-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.atl-col {
    flex: 1 1 0;
    min-width: 180px;
}

.atl-label {
    font-size: 12px;
    font-weight: 700;
    color: #0b2b5a;
    margin-bottom: 6px;
    display: block;
}

.atl-input {
    display: flex;
    align-items: stretch;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e6eef8;
    background: #fbfdff;
}

    .atl-input .icon {
        width: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #f1f7ff;
        color: #0b66ff;
        border-right: 1px solid #e6eef8;
        font-size: 16px;
    }

    .atl-input select.form-select, .atl-input input.form-control, .atl-input textarea.form-control {
        border: 0;
        padding: 8px 10px;
        font-size: 13px;
        background: transparent;
        min-height: 42px;
        -webkit-appearance: none;
        appearance: none;
    }

        .atl-input select.form-select:disabled, .atl-input input.form-control:disabled {
            opacity: 0.7;
        }

.atl-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
    align-items: center;
}

    .atl-legend .item {
        display: flex;
        gap: 8px;
        align-items: center;
        font-size: 13px;
        color: #0b2b5a;
    }

    .atl-legend .dot {
        width: 12px;
        height: 12px;
        border-radius: 50%;
        display: inline-block;
    }

.map-box {
    height: 260px;
    border-radius: 8px;
    border: 1px solid #e6eef8;
    overflow: hidden;
    background: #f7fbff;
}

.loading-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.6);
    z-index: 40;
    border-radius: 8px;
}

.small-spinner {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 3px solid rgba(11,102,255,0.15);
    border-top-color: #0b66ff;
    animation: spin .9s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* responsive */
@media (max-width:767px) {
    .atl-row {
        gap: 10px
    }

    .atl-col {
        min-width: 100%
    }
}
/* ==============================
   PROFESSIONAL BADGES (Screenshot Style)
   ============================== */


/* Modern Modal Styling */
.modern-modal {
    border-radius: .6rem;
    overflow: hidden;
}

    /* Header Styling */
    .modern-modal .modal-header {
        background: linear-gradient(90deg, #0d6efd, #0a58ca);
        color: #fff;
        padding: .5rem .75rem;
    }

        .modern-modal .modal-header .modal-title {
            font-size: 1rem;
            font-weight: 600;
        }

    .modern-modal .btn-close {
        filter: invert(1);
    }

    /* Body Styling */
    .modern-modal .modal-body {
        padding: .75rem;
        font-size: .9rem;
    }

    /* Footer Styling */
    .modern-modal .card-footer {
        padding: .5rem .75rem;
        border-top: 1px solid #e9ecef;
    }

    /* Buttons */
    .modern-modal .btn-sm {
        padding: .25rem .5rem;
        font-size: .8rem;
    }

/* Responsive tweaks */
@media (max-width: 576px) {
    .modern-modal .modal-dialog {
        margin: .5rem;
    }

    .modern-modal .modal-body {
        font-size: .85rem;
    }
}
.modal-backdrop {
    --bs-backdrop-zindex: 0!important;
}
    /* Modal backdrop for locationsModal */
    /* Locations Modal (lower z-index for locationsModal) */
    #locationsModal {
    z-index: 1050 !important; /* Below mainModal */
}

/* Main Modal (higher z-index for mainModal) */
#mainModal {
    z-index: 1060 !important; /* On top of locationsModal */
}

/* Locations Modal Backdrop */
#locationsModal .modal-backdrop {
    z-index: 1049 !important; /* Behind mainModal's backdrop */
    --bs-backdrop-zindex: 0 !important;
}

/* Main Modal Backdrop */
#mainModal .modal-backdrop {
    z-index: 1051 !important; /* Above locationsModal's backdrop */
    --bs-backdrop-zindex: 0 !important;
}

/* Ensure modals are fixed in position */
#locationsModal, #mainModal {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

    /* Prevent location modal backdrop from blocking the main modal */
    #locationsModal .modal-backdrop {
        pointer-events: none !important;
    }

#locationsModal {
    pointer-events: auto !important; /* Enable interaction */
}

/* Disable pointer events on the backdrop of the mainModal */
/*.modal-backdrop {
    pointer-events: none !important;
}*/
.modal-xl {
    max-width: 1100px;
}

.modal-content {
    border-radius: 14px;
    border: none;
    background: #fff !important;
    box-shadow: 0 6px 28px rgba(0,0,0,0.08);
}

.modal-header {
    padding: 10px 16px;
    border-bottom: 1px solid #e9ecef;
}

.modal-body {
    padding: 14px 20px;
}

.factory-card {
    border-radius: 12px;
    border: 1px solid #e6e6e6;
    margin-bottom: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}

.factory-header {
    background: #f7fff7;
    padding: 8px 14px;
    border-bottom: 1px solid #e6e6e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.factory-actions button {
    margin-left: 4px;
}

.department-box {
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    padding: 8px 12px;
    background: #fafafa;
    margin-bottom: 8px;
}

    .department-box .d-flex {
        padding-bottom: 4px;
        border-bottom: 1px dashed #ccc;
    }

.list-group-item {
    padding: 6px 10px !important;
    margin-bottom: 4px;
    border-radius: 8px !important;
    border: 1px solid #e5e5e5 !important;
    transition: 0.15s ease;
}

    .list-group-item:hover {
        background: #f7f7ff;
        border-color: #d4d4ff;
    }

.btn-sm {
    padding: 3px 6px !important;
    font-size: .75rem !important;
    border-radius: 6px !important;
}

.btn-outline-secondary:hover {
    background: #efefef;
}

.btn-outline-danger:hover {
    background: #ffecec;
}

.btn-outline-primary:hover {
    background: #eef3ff;
}

.btn-outline-success:hover {
    background: #ebffef;
}

#btnAddFactory {
    padding: 6px 12px;
    font-size: .8rem;
    border-radius: 8px;
}
/* 🔥 Password Strength Bar */
.strength-bar {
    width: 0%;
    height: 6px;
    border-radius: 8px;
    background-color: #ddd;
    transition: width .3s ease, background-color .3s ease;
}

/* 💢 Shake animation for invalid fields */
.shake {
    animation: shakeAnim .4s ease;
}

@keyframes shakeAnim {
    0% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-6px);
    }

    50% {
        transform: translateX(6px);
    }

    75% {
        transform: translateX(-4px);
    }

    100% {
        transform: translateX(0);
    }
}

/* 🎉 Success glow */
.success-glow {
    animation: successGlow 1.2s ease-out;
}

@keyframes successGlow {
    0% {
        box-shadow: 0 0 0 rgba(0,255,130,0.9);
    }

    50% {
        box-shadow: 0 0 20px rgba(0,255,130,0.7);
    }

    100% {
        box-shadow: 0 0 0 rgba(0,255,130,0);
    }
}
/* Progress bar animation */
.progress-bar {
    transition: width 1s ease-in-out;
    font-size: 0.75rem;
}

/* Gradient states */
.progress-danger {
    background: linear-gradient(90deg, #dc3545, #ff6b6b);
    color: #fff;
}

.progress-warning {
    background: linear-gradient(90deg, #ffc107, #ffdd57);
    color: #212529;
}

.progress-success {
    background: linear-gradient(90deg, #28a745, #5cd65c);
    color: #fff;
}

/* Timeline hover effect */
.timeline-step {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

    .timeline-step:hover {
        transform: translateY(-2px);
        box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    }

/* Animated icons */
.animate-done {
    animation: fadeScaleIn 0.6s ease forwards;
}

@keyframes fadeScaleIn {
    from {
        opacity: 0;
        transform: scale(0.6);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive buttons */
.action-bar .btn {
    font-size: 0.85rem;
}

@media (max-width: 576px) {
    .action-bar .btn {
        flex: 1 1 100%;
        justify-content: center;
    }
}
.disabled-btn {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}
.badge-container {
    display: flex;
    flex-wrap: nowrap; /* لا يلتف */
    gap: 0.35rem;
    max-width: 100%;
    overflow-x: auto; /* Scroll أفقي عند الحاجة */
    -webkit-overflow-scrolling: touch; /* سكرول سلس على الموبايل */
}

/* -----------------------------
   Permit Header / Filters
------------------------------ */
.bg-permitHeader {
    background-color: #f1eeee!important;
    border: 1px solid #dae0e3;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    justify-content: space-between;
}

    .bg-permitHeader .form-control,
    .bg-permitHeader .form-select {
        font-size: 0.875rem;
        padding: 0.35rem 0.6rem;
        border-radius: 4px;
        min-width: 150px;
        max-width: 100%;
        flex: 1 1 auto;
    }

/* Responsive */
@media (max-width: 768px) {
    .bg-permitHeader {
        flex-direction: column;
        align-items: stretch;
    }

        .bg-permitHeader > div,
        .bg-permitHeader .form-control,
        .bg-permitHeader .form-select {
            width: 100%;
        }
}

/* -----------------------------
   Badge Container & Badges
------------------------------ */
.badge-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
}

.pro-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.5rem;
    border-radius: 0.4rem;
    font-size: 0.75rem;
    line-height: 1.2;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(0,0,0,0.08);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

    .pro-badge i {
        font-size: 1.1rem;
        margin-right: 0.25rem;
    }

    .pro-badge:hover {
        transform: translateY(-1px);
        box-shadow: 0 2px 4px rgba(0,0,0,0.12);
    }

/* Badge color themes (gradient Atlas-style) */
/*.pro-badge-primary {*/
  /*  background: linear-gradient(90deg, #007bff, #3399ff);
    color: #fff;*/
/*    background: #e8f0ff;
    color: #0b57d0;
    border-color: #d0e0ff;*/
/*}*/
/*.pro-badge-success {
    background: #e7faef;
    color: #0c7a3e;
    border-color: #c8f0d6;
}

.pro-badge-info {
    background: #e6f7ff;
    color: #06779f;
    border-color: #c8efff;
}

.pro-badge-warning {
    background: #fff4e5;
    color: #b76e00;
    border-color: #ffe5c2;
}

.pro-badge-danger {
    background: #ffeaea;
    color: #b20000;
    border-color: #ffcfcf;
}

.pro-badge-secondary {
    background: #f1f1f1;
    color: #555;
    border-color: #e0e0e0;
}*/

/*.pro-badge-success {
    background: linear-gradient(90deg, #28a745, #5cd65c);
    color: #fff;
}

.pro-badge-info {
    background: linear-gradient(90deg, #17a2b8, #66d9e8);
    color: #fff;
}

.pro-badge-warning {
    background: linear-gradient(90deg, #ffc107, #ffdd57);
    color: #212529;
}

.pro-badge-danger {
    background: linear-gradient(90deg, #dc3545, #ff6b6b);
    color: #fff;
}

.pro-badge-secondary {
    background: linear-gradient(90deg, #6c757d, #adb5bd);
    color: #fff;
}*/
/* Badge color themes (gradient Atlas-style, softer opacity) */
.pro-badge-primary {
    background: linear-gradient(90deg, rgba(0,123,255,0.2), rgba(51,153,255,0.2));
    color: #007bff;
}

.pro-badge-success {
    background: linear-gradient(90deg, rgba(40,167,69,0.2), rgba(92,214,92,0.2));
    color: #28a745;
}

.pro-badge-info {
    background: linear-gradient(90deg, rgba(23,162,184,0.2), rgba(102,217,232,0.2));
    color: #17a2b8;
}

.pro-badge-warning {
    background: linear-gradient(90deg, rgba(255,193,7,0.2), rgba(255,221,87,0.2));
    color: #b76e00;
}

.pro-badge-danger {
    background: linear-gradient(90deg, rgba(220,53,69,0.2), rgba(255,107,107,0.2));
    color: #dc3545;
}

.pro-badge-secondary {
    background: linear-gradient(90deg, rgba(108,117,125,0.2), rgba(173,181,189,0.2));
    color: #555;
}


/* Responsive tweaks for badges */
@media (max-width: 576px) {
    .pro-badge {
        font-size: 0.7rem;
        padding: 0.15rem 0.4rem;
    }
}

/* -----------------------------
   Stat Tiles (Atlas style)
------------------------------ */
.stat-tile {
    background-color: var(--bs-body-bg);
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: 0.5rem;
    min-height: 90px;
    transition: all 0.2s ease-in-out;
}

    .stat-tile:hover {
        /*transform: translateY(-3px);*/
        box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    }

.icon-wrapper {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-inline: auto;
}

.stat-tile i {
    color: inherit !important;
}

/* Gradient themes for stat tiles */
.gradient-primary {
    background: linear-gradient(135deg, #e9f1ff 0%, #d6e6ff 100%);
    color: #0d6efd;
}

.gradient-success {
    background: linear-gradient(135deg, #e9fbea 0%, #d6f5d8 100%);
    color: #198754;
}

.gradient-warning {
    background: linear-gradient(135deg, #fff7df 0%, #ffeec0 100%);
    color: #ffc107;
}

.gradient-danger {
    background: linear-gradient(135deg, #ffe5e6 0%, #ffd5d7 100%);
    color: #dc3545;
}

/* Stats grid spacing */
.stats-grid {
    row-gap: 0.6rem !important;
    column-gap: 0.6rem !important;
}

/* -----------------------------
   List group items & hr
------------------------------ */
.list-group-item {
    border: none;
    background-color: transparent;
    transition: background-color 0.2s ease;
}

    .list-group-item:hover {
        background-color: var(--bs-light);
    }

hr {
    border: none;
    border-top: 1px solid var(--bs-border-color);
    margin: 0.25rem 0;
}

/* -----------------------------
   Buttons
------------------------------ */
.btn-outline-secondary {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 0.375rem;
}

/* Responsive tweaks for headers */
@media (max-width: 768px) {
    .factory-header, .department-box .d-flex {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
}
.selected-card {
    outline: 3px solid #0d6efd;
    border-radius: 8px;
    transition: 0.3s ease;
}
.role-no-privilege {
    background-color: #dc3545 !important; /* Bootstrap danger red */
    color: #fff !important;
    border-radius: 6px;
    padding: 3px 8px;
    font-weight: 600;
}
.field-box {
    display: flex;
    flex-direction: column;
}

textarea.form-control {
    resize: none;
}
/* Chevron rotation */
.toggle-badges-btn i {
    transition: transform 0.3s ease, color 0.3s ease;
}

.toggle-badges-btn[aria-expanded="true"] i {
    transform: rotate(180deg);
    color: #0d6efd; /* Bootstrap primary color */
}

/* Optional: hover effect for the header */
.hover-bg:hover {
    background-color: #e9f2ff; /* subtle light-blue background */
}

/* Small responsive spacing */
@media (max-width: 576px) {
    .toggle-badges-btn {
        padding: 0.25rem;
    }

    .permit-card-body-small {
        gap: 1px;
    }
}

/*@media (min-width: 768px) {
    .col-md-6 {
        flex: 0 0 auto;
        width: 48% !important;
        margin-left: 15px !important;
    }
}*/
/* Make top border thick */
.permit-card {
    border: 1px solid #e5e5e5;
    background: #fff !important;
    /*transition: 0.2s ease;*/
    border-top-width: 5px !important;
    border-top-style: solid !important;
}

    /* Hover effect */
    .permit-card:hover {
        /*transform: translateY(-4px);*/
        box-shadow: 0 8px 20px rgba(0,0,0,0.10);
    }

/* ------ COLOR VARIANTS (based on status) ------ */

.permit-card-primary {
    border-top-color: #0d6efd !important;
    background: #e8f1ff !important;
}

.permit-card-secondary {
    border-top-color: #6c757d !important;
    background: #f5f5f5 !important;
}

.permit-card-success {
    border-top-color: #198754 !important;
    background: #e9f8ee !important;
}

.permit-card-danger {
    border-top-color: #dc3545 !important;
    background: #fdeaea !important;
}

.permit-card-warning {
    border-top-color: #ffc107 !important;
    background: #fff8e4 !important;
}

.permit-card-info {
    border-top-color: #0dcaf0 !important;
    background: #e8faff !important;
}

.permit-card-dark {
    border-top-color: #212529 !important;
    background: #f1f1f1 !important;
}
span.pro-badge.pro-badge-dark.rounded-pill.shadow-sm.px-3.py-1 {
    background: dimgray!important;
}
/* Button Style */
.action-toggle {
    background: #ffffff;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    /*transition: all 0.2s ease-in-out;*/
}

    .action-toggle:hover {
        background: #f5f5f5;
        transform: scale(1.08);
    }

/* Dropdown Style */
.action-dropdown {
    padding: 4px 0;
    min-width: 190px;
    border-radius: 12px !important;
}

    .action-dropdown .dropdown-item {
        padding: 6px 10px;
        font-size: 0.9rem;
        border-radius: 8px;
        display: flex;
        align-items: center;
        /*transition: background 0.15s ease;*/
    }

        .action-dropdown .dropdown-item:hover {
            background: #f0f0f0 !important;
        }

    .action-dropdown i {
        font-size: 1rem;
    }
/* Random gradient backgrounds for headers */
.header-gradient {
    background: linear-gradient(135deg, #2563eb, /* Fluent Blue */
    #9333ea, /* Purple */
    #f59e0b, /* Amber */
    #10b981 /* Emerald */
    );
    background-size: 400% 400%;
    animation: gradientShift 12s ease infinite;
}

/* Animation for smooth shifting */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}
.mini-status-card {
    background: linear-gradient(145deg, #ffffff, #f5f5f7);
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: .85rem;
    transition: all 0.25s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

    .mini-status-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.12);
        background: linear-gradient(145deg, #fafafa, #f1f1f3);
    }

.mini-icon-bg {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
}


/* Dropdown button */
.permit-card-btn {
    width: 22px;
    height: 22px;
    padding: 0 !important;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
}



/* --- Body --- */
.permit-card-body {
    padding: 4px 6px !important;
    background: #f9fafb;
}


/* Responsiveness fix: keep layout neat on small screens */
@media (max-width: 768px) {


    .dropdown-item {
        font-size: 0.7rem !important;
    }
}


.custom-swal-width {
    width: auto !important;
    max-width: 90%; 
}


@media (min-width: 992px) { 
    .custom-swal-width {
        width: 500px !important;
    }
}
/* Arabic RTL for accordion buttons */
.accordion-ar {
    direction: rtl; /* Flip content */
}

    .accordion-ar .activity-icon-preview,
    .accordion-ar .sequence-icon-preview {
        margin-left: 0 !important;
        margin-right: 0.5rem; /* Adjust spacing */
    }

    .accordion-ar .sequence-name-preview {
        text-align: right;
    }

    .accordion-ar .badge {
        margin-left: 0;
        margin-right: 0.5rem;
    }
.attachment-menu {
    min-width: 180px;
    border-radius: 12px;
    padding: 8px;
}

    .attachment-menu .dropdown-item {
        padding: 10px 14px;
        font-size: 14px;
        border-radius: 8px;
        transition: 0.2s;
    }

        .attachment-menu .dropdown-item:hover {
            background-color: #f0f4ff;
        }

.preview-box img {
    max-width: 100%;
    border-radius: 10px;
}

.preview-box {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}
