:root {
    --md-bg: #eef2f7;
    --md-surface: #f8fbff;
    --md-card: #ffffff;
    --md-card-soft: #f4f8fd;
    --md-text: #1e2a3b;
    --md-muted: #6e7e95;
    --md-accent: #1f8b6f;
    --md-accent-2: #56b49f;
    --md-danger: #ef6461;
    --md-warn: #f2a93b;
    /* Arabic UI: used when html[dir="rtl"] (Cairo is loaded in top_header) */
    --md-font-ar: "Cairo", "Tajawal", "Noto Kufi Arabic", "Segoe UI", Tahoma, "Arial Unicode MS", sans-serif;
    --md-radius-lg: 22px;
    --md-radius-md: 16px;
    --md-radius-sm: 12px;
    /* --md-shadow-soft: 10px 10px 24px rgba(28, 38, 56, 0.08), -8px -8px 22px rgba(255, 255, 255, 0.95);
    --md-shadow-card: 8px 8px 20px rgba(42, 59, 84, 0.08), -6px -6px 14px rgba(255, 255, 255, 0.9); */
    --md-shadow-inset: inset 2px 2px 7px rgba(147, 170, 199, 0.22), inset -2px -2px 7px rgba(255, 255, 255, 0.85);
}

/* One-time “intro” spin on load (replaces looping idle; reduced-motion turns off) */
@keyframes md-dash-icon-spin-once {
    from {
        transform: translateZ(6px) rotateZ(0deg);
    }

    to {
        transform: translateZ(6px) rotateZ(360deg);
    }
}

@keyframes md-dash-icon-spin-once-plain {
    from {
        transform: rotateZ(0deg);
    }

    to {
        transform: rotateZ(360deg);
    }
}

@keyframes md-dash-micon-spin-once {
    from {
        transform: perspective(200px) rotateY(0deg);
    }

    to {
        transform: perspective(200px) rotateY(360deg);
    }
}

@keyframes md-dash-hamburger-spin-once {
    from {
        transform: translate3d(0, 0, 0) rotateZ(0deg);
    }

    to {
        transform: translate3d(0, 0, 0) rotateZ(360deg);
    }
}

@keyframes md-dash-stat-tile-spin-once {
    from {
        transform: perspective(240px) rotateY(0deg) rotateX(0deg);
    }

    to {
        transform: perspective(240px) rotateY(360deg) rotateX(0deg);
    }
}

body.modern-dashboard {
    background: radial-gradient(circle at 100% 0%, #1f8c7085 100%, #eef2f7 100%);
    color: var(--md-text);
}

/* Arabic dashboard: apply readable Arabic font (tables were inheriting a Latin-first stack) */
html[dir="rtl"] body.modern-dashboard,
html[dir="rtl"] body.modern-dashboard .pcoded-content,
html[dir="rtl"] body.modern-dashboard .pcoded-main-container {
    font-family: var(--md-font-ar);
}

body.modern-dashboard .pcoded-main-container {
    min-height: 100vh;
}

body.modern-dashboard .pcoded-navbar {
    background: linear-gradient(180deg, #1f8b6f 0%, #2aa387 90%);
    border-radius: 0 28px 28px 0;
    box-shadow: 8px 0 24px rgba(19, 76, 64, 0.18);
}

html[dir="rtl"] body.modern-dashboard .pcoded-navbar {
    border-radius: 28px 0 0 28px;
}

/* Sidebar profile: stable circle in expanded + collapsed drawer */
body.modern-dashboard .pcoded-navbar .main-menu-header.modern-sidebar-profile {
    height: auto !important;
    min-height: 0 !important;
    padding: 18px 14px 14px !important;
    margin: 10px 10px 8px !important;
    border-radius: 20px !important;
    background: rgba(255, 255, 255, 0.16) !important;
    backdrop-filter: blur(8px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.28),
        0 8px 22px rgba(0, 0, 0, 0.14);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

body.modern-dashboard .pcoded-navbar .main-menu-header .modern-sidebar-avatar,
body.modern-dashboard .pcoded-navbar .main-menu-header img.img-radius {
    width: 68px !important;
    height: 68px !important;
    max-width: 100%;
    object-fit: cover;
    border-radius: 50% !important;
    margin: 0 auto 10px !important;
    display: block;
    border: 3px solid rgba(255, 255, 255, 0.45);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
}

body.modern-dashboard .pcoded-navbar .main-menu-header .user-details a {
    color: rgba(255, 255, 255, 0.95) !important;
    text-decoration: none;
}

body.modern-dashboard .pcoded-navbar .main-menu-header #more-details {
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.25;
    word-break: break-word;
}

/* Collapsed narrow rail: keep round avatar + readable name (no 3D text hide) */
body.modern-dashboard .pcoded-navbar.navbar-collapsed:not(:hover) .main-menu-header.modern-sidebar-profile {
    padding: 12px 8px !important;
    margin: 8px 6px !important;
}

body.modern-dashboard .pcoded-navbar.navbar-collapsed:not(:hover) .main-menu-header .modern-sidebar-avatar,
body.modern-dashboard .pcoded-navbar.navbar-collapsed:not(:hover) .main-menu-header img.img-radius {
    width: 44px !important;
    height: 44px !important;
    margin-bottom: 6px !important;
    border-width: 2px;
}

body.modern-dashboard .pcoded-navbar.navbar-collapsed:not(:hover) .main-menu-header #more-details,
body.modern-dashboard .pcoded-navbar.navbar-collapsed:not(:hover) .main-menu-header .user-details>a>div {
    transform: none !important;
    opacity: 1 !important;
    font-size: 0.65rem !important;
    font-weight: 700;
    max-width: 58px;
    margin: 0 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: rgba(255, 255, 255, 0.95) !important;
}

/* Top-level drawer links only — submenu uses its own contrast (see below) */
body.modern-dashboard .pcoded-navbar .pcoded-inner-navbar>li>a,
body.modern-dashboard .pcoded-navbar .pcoded-inner-navbar>li>a .pcoded-mtext,
body.modern-dashboard .pcoded-navbar .pcoded-inner-navbar>li>a .pcoded-micon {
    color: #eaf8f3 !important;
    font-weight: 600;
}

body.modern-dashboard .pcoded-navbar .pcoded-inner-navbar>li>a {
    width: 100%;
    box-sizing: border-box;
    border-radius: 12px;
}

body.modern-dashboard .pcoded-navbar .pcoded-inner-navbar>li {
    /* margin-inline: 10px; */
    width: calc(100% - 20px);
    max-width: 100%;
    box-sizing: border-box;
}

body.modern-dashboard .pcoded-navbar .pcoded-inner-navbar>li.active>a,
body.modern-dashboard .pcoded-navbar .pcoded-inner-navbar>li:hover>a {
    background: rgba(255, 255, 255, 0.18);
    border-radius: 12px;
}

/* Nested dropdown (e.g. Reports): full width + readable text on light panel */
body.modern-dashboard .pcoded-navbar .pcoded-inner-navbar li.pcoded-hasmenu .pcoded-submenu {
    /* width: 100% !important;
    max-width: 100%; */
    margin-inline: 10px !important;
    padding: 8px 0 !important;
    box-sizing: border-box;
    border-radius: 12px;
    background: linear-gradient(180deg, #f8fffc 0%, #ecf8f3 100%) !important;
    box-shadow:
        0 6px 18px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.65);
}

body.modern-dashboard .pcoded-navbar .pcoded-inner-navbar li.pcoded-hasmenu .pcoded-submenu li>a {
    color: #0f3d32 !important;
    font-weight: 600;
    text-align: start;
    width: 100%;
    box-sizing: border-box;
    margin: 0 !important;
    padding-block: 10px !important;
    padding-inline-end: 12px !important;
    padding-inline-start: 38px !important;
    border-radius: 10px;
    background: transparent !important;
}

html[dir="rtl"] body.modern-dashboard .pcoded-navbar .pcoded-inner-navbar li.pcoded-hasmenu .pcoded-submenu li>a {
    text-align: right;
}

body.modern-dashboard .pcoded-navbar .pcoded-inner-navbar li.pcoded-hasmenu .pcoded-submenu li>a:hover,
body.modern-dashboard .pcoded-navbar .pcoded-inner-navbar li.pcoded-hasmenu .pcoded-submenu li>a:focus {
    color: #063022 !important;
    background: rgba(31, 139, 111, 0.12) !important;
}

body.modern-dashboard .pcoded-navbar .pcoded-inner-navbar li.pcoded-hasmenu .pcoded-submenu li.active>a {
    color: #063022 !important;
    background: rgba(31, 139, 111, 0.18) !important;
}

body.modern-dashboard .pcoded-navbar .pcoded-inner-navbar li.pcoded-hasmenu .pcoded-submenu li>a:before {
    color: var(--md-accent) !important;
    opacity: 0.9;
}

body.modern-dashboard .pcoded-navbar .pcoded-inner-navbar li.pcoded-hasmenu .pcoded-submenu li+li>a {
    border-top: 1px solid rgba(31, 139, 111, 0.12) !important;
}

/* Collapsed rail: keep theme “hide submenu label” behavior */
body.modern-dashboard .pcoded-navbar.navbar-collapsed:not(:hover) .pcoded-inner-navbar>li.pcoded-trigger .pcoded-submenu li>a {
    color: transparent !important;
}

body.modern-dashboard .pcoded-header {
    background: transparent !important;
    box-shadow: none !important;
}

/* m-header: flex row so drawer toggle is not theme-absolute (avoids straddling / RTL edge bugs) */
body.modern-dashboard .pcoded-header .m-header {
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap;
    position: relative;
    box-sizing: border-box;
}

@media (min-width: 992px) {
    body.modern-dashboard .pcoded-header .m-header {
        justify-content: center;
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
}

@media (max-width: 991.98px) {
    body.modern-dashboard .pcoded-header .m-header {
        justify-content: space-between;
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    body.modern-dashboard .pcoded-header .m-header .mob-toggler {
        position: static !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        width: 44px;
        height: 44px;
        margin: 0 !important;
        padding: 0 !important;
        flex-shrink: 0;
    }
}

/* Header drawer toggle: pill + even hamburger lines (mint bar friendly) */
body.modern-dashboard .pcoded-header .m-header .mobile-menu.modern-mobile-menu-toggle,
body.modern-dashboard #mobile-collapse.modern-mobile-menu-toggle {
    position: static !important;
    top: auto !important;
    right: auto !important;
    left: auto !important;
    bottom: auto !important;
    width: 44px !important;
    height: 44px !important;
    min-width: 44px;
    padding: 0 !important;
    margin: 0 !important;
    flex-shrink: 0;
    border-radius: 14px !important;
    background: linear-gradient(145deg, #ffffff 0%, #eef8f4 100%) !important;
    box-shadow:
        0 4px 14px rgba(19, 76, 64, 0.16),
        0 1px 0 rgba(255, 255, 255, 0.9) inset;
    border: 1px solid rgba(255, 255, 255, 0.7);
    transform-style: preserve-3d;
    animation: md-dash-hamburger-spin-once 0.7s cubic-bezier(0.34, 1.1, 0.64, 1) 2s 1 both;
    transition: transform 0.22s cubic-bezier(0.34, 1.4, 0.64, 1), box-shadow 0.22s ease, background 0.22s ease;
}

body.modern-dashboard #mobile-collapse.modern-mobile-menu-toggle:hover {
    background: #ffffff !important;
    transform: translateY(-3px) rotateX(6deg);
    box-shadow:
        0 10px 24px rgba(19, 76, 64, 0.24),
        0 2px 0 rgba(255, 255, 255, 1) inset;
}

body.modern-dashboard #mobile-collapse.modern-mobile-menu-toggle span {
    width: 20px;
    height: 2px;
    margin: 0 auto;
    background-color: var(--md-accent) !important;
    border-radius: 2px;
}

body.modern-dashboard #mobile-collapse.modern-mobile-menu-toggle span::before,
body.modern-dashboard #mobile-collapse.modern-mobile-menu-toggle span::after {
    background-color: var(--md-accent) !important;
    width: 20px !important;
    left: 0 !important;
    right: 0 !important;
    margin-left: auto;
    margin-right: auto;
    border-radius: 2px;
}

body.modern-dashboard #mobile-collapse.modern-mobile-menu-toggle span::before {
    top: -7px;
}

body.modern-dashboard #mobile-collapse.modern-mobile-menu-toggle span::after {
    top: 7px;
}

body.modern-dashboard #mobile-collapse.modern-mobile-menu-toggle:hover span,
body.modern-dashboard #mobile-collapse.modern-mobile-menu-toggle:hover span::before,
body.modern-dashboard #mobile-collapse.modern-mobile-menu-toggle:hover span::after {
    background-color: #156b55 !important;
}

/* Top header: unified circular icon buttons (language, accounting, user) */
body.modern-dashboard .modern-topbar-icon-btn {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px;
    padding: 0 !important;
    margin: 0 2px;
    border: 0 !important;
    border-radius: 50% !important;
    background: linear-gradient(145deg, #ffffff 0%, #f0faf7 55%, #e4f4ee 100%) !important;
    color: var(--md-accent) !important;
    box-shadow:
        0 6px 16px rgba(19, 76, 64, 0.2),
        0 2px 0 rgba(255, 255, 255, 0.95) inset,
        0 -3px 8px rgba(31, 139, 111, 0.08) inset;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    transform-style: preserve-3d;
    transition: transform 0.22s cubic-bezier(0.34, 1.4, 0.64, 1), box-shadow 0.22s ease, background 0.22s ease;
}

body.modern-dashboard .modern-topbar-icon-btn i,
body.modern-dashboard .modern-topbar-icon-btn .feather {
    color: var(--md-accent) !important;
    stroke: var(--md-accent);
    line-height: 1;
    display: block;
    transform-origin: center center;
    transform: translateZ(6px);
    filter: drop-shadow(0 2px 1px rgba(19, 76, 64, 0.22));
    animation: md-dash-icon-spin-once 0.75s cubic-bezier(0.34, 1.1, 0.64, 1) 2s 1 both;
    transition: transform 0.28s cubic-bezier(0.34, 1.45, 0.64, 1), filter 0.28s ease;
}

body.modern-dashboard .modern-topbar-actions>li:nth-child(1) .modern-topbar-icon-btn .feather,
body.modern-dashboard .modern-topbar-actions>li:nth-child(1) .modern-topbar-icon-btn i {
    animation-delay: 2s;
}

body.modern-dashboard .modern-topbar-actions>li:nth-child(2) .modern-topbar-icon-btn .feather,
body.modern-dashboard .modern-topbar-actions>li:nth-child(2) .modern-topbar-icon-btn i {
    animation-delay: 2.12s;
}

body.modern-dashboard .modern-topbar-actions>li:nth-child(3) .modern-topbar-icon-btn .feather,
body.modern-dashboard .modern-topbar-actions>li:nth-child(3) .modern-topbar-icon-btn i {
    animation-delay: 2.24s;
}

body.modern-dashboard .modern-topbar-icon-btn:hover,
body.modern-dashboard .modern-topbar-icon-btn:focus {
    color: var(--md-accent) !important;
    background: linear-gradient(145deg, #ffffff 0%, #f6fffc 100%) !important;
    transform: translateY(-3px) rotateX(4deg);
    box-shadow:
        0 12px 26px rgba(19, 76, 64, 0.28),
        0 2px 0 rgba(255, 255, 255, 1) inset,
        0 -4px 12px rgba(31, 139, 111, 0.12) inset;
    text-decoration: none !important;
}

body.modern-dashboard .modern-topbar-icon-btn:hover .feather,
body.modern-dashboard .modern-topbar-icon-btn:hover i,
body.modern-dashboard .modern-topbar-icon-btn:focus .feather,
body.modern-dashboard .modern-topbar-icon-btn:focus i {
    transform: translateZ(14px) rotateX(-12deg) rotateY(8deg) scale(1.08);
    filter: drop-shadow(0 6px 4px rgba(19, 76, 64, 0.28));
}

body.modern-dashboard .modern-topbar-icon-btn.dropdown-toggle::after {
    display: none !important;
}

/* Topbar icon row: one baseline (override theme line-height / ml-auto height) */
body.modern-dashboard .pcoded-header .navbar-nav.ml-auto.modern-topbar-actions {
    float: none !important;
    height: auto !important;
    min-height: 0 !important;
    display: inline-flex !important;
    flex-direction: row;
    align-items: center !important;
    flex-wrap: wrap;
    vertical-align: middle;
    gap: 4px;
    padding-inline: 6px;
}

body.modern-dashboard .pcoded-header .modern-topbar-actions.navbar-nav>li {
    display: flex !important;
    align-items: center !important;
    justify-content: center;
    line-height: 1 !important;
    height: auto !important;
    min-height: 44px;
    padding-left: 0 !important;
    padding-right: 0 !important;
    perspective: 320px;
}

body.modern-dashboard .pcoded-header .modern-topbar-actions .dropdown {
    height: auto !important;
    line-height: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center;
}

body.modern-dashboard .modern-topbar-actions .nav-item {
    display: flex !important;
    align-items: center !important;
}

body.modern-dashboard .modern-topbar-actions .drp-user {
    display: flex !important;
    align-items: center !important;
    justify-content: center;
    height: auto !important;
    margin: 0;
}

body.modern-dashboard .modern-topbar-icon-btn i.f-30,
body.modern-dashboard .modern-topbar-icon-btn .feather.f-30 {
    font-size: 1.35rem !important;
    width: 1.35rem;
    height: 1.35rem;
    display: block;
    line-height: 1 !important;
}

body.modern-dashboard .pcoded-content {
    padding-top: 0px;
}

body.modern-dashboard .page-header .page-header-title h5 {
    font-size: 20px;
    font-weight: 700;
}

body.modern-dashboard .breadcrumb {
    background: transparent;
}

body.modern-dashboard .breadcrumb .feather {
    display: inline-block;
    transform-origin: center;
    filter: drop-shadow(0 2px 2px rgba(31, 139, 111, 0.2));
    animation: md-dash-icon-spin-once-plain 0.7s cubic-bezier(0.34, 1.1, 0.64, 1) 2s 1 both;
    transition: transform 0.25s cubic-bezier(0.34, 1.4, 0.64, 1);
}

body.modern-dashboard .breadcrumb a:hover .feather {
    transform: translateY(-2px) rotateZ(-8deg) scale(1.12);
}

/* Sidebar menu icons: soft idle + stronger 3D on hover (top-level links only) */
body.modern-dashboard .pcoded-navbar .pcoded-inner-navbar>li>a {
    perspective: 220px;
}

body.modern-dashboard .pcoded-navbar .pcoded-inner-navbar>li>a .pcoded-micon {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    transform-style: preserve-3d;
    transition: transform 0.35s cubic-bezier(0.34, 1.45, 0.64, 1), filter 0.35s ease;
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.18));
    animation: md-dash-micon-spin-once 0.8s cubic-bezier(0.34, 1.1, 0.64, 1) 2s 1 both;
}

body.modern-dashboard .pcoded-navbar .pcoded-inner-navbar>li>a .pcoded-micon i,
body.modern-dashboard .pcoded-navbar .pcoded-inner-navbar>li>a .pcoded-micon .feather {
    transform: translateZ(4px);
    transition: transform 0.35s cubic-bezier(0.34, 1.45, 0.64, 1);
}

body.modern-dashboard .pcoded-navbar .pcoded-inner-navbar>li>a:hover .pcoded-micon,
body.modern-dashboard .pcoded-navbar .pcoded-inner-navbar>li>a:focus .pcoded-micon {
    animation: none;
    transform: translateY(-4px) translateZ(10px) rotateY(-14deg) scale(1.06);
    filter: drop-shadow(0 8px 6px rgba(0, 0, 0, 0.22));
}

body.modern-dashboard .pcoded-navbar .pcoded-inner-navbar>li>a:hover .pcoded-micon i,
body.modern-dashboard .pcoded-navbar .pcoded-inner-navbar>li>a:hover .pcoded-micon .feather,
body.modern-dashboard .pcoded-navbar .pcoded-inner-navbar>li>a:focus .pcoded-micon i,
body.modern-dashboard .pcoded-navbar .pcoded-inner-navbar>li>a:focus .pcoded-micon .feather {
    transform: translateZ(12px) rotateX(-6deg);
}

/* Homepage / content: prominent feather icons (stat cards use .social-icon below) */
body.modern-dashboard .pcoded-content .feather.f-30,
body.modern-dashboard .pcoded-content .feather.f-36 {
    display: inline-block;
    transform-style: preserve-3d;
    transform-origin: center center;
    filter: drop-shadow(0 3px 2px rgba(19, 76, 64, 0.18));
    animation: md-dash-icon-spin-once-plain 0.75s cubic-bezier(0.34, 1.1, 0.64, 1) 2s 1 both;
    transition: transform 0.3s cubic-bezier(0.34, 1.45, 0.64, 1), filter 0.3s ease;
}

body.modern-dashboard .pcoded-content .card:hover .feather.f-30,
body.modern-dashboard .pcoded-content .card:hover .feather.f-36 {
    transform: translateY(-4px) rotateX(10deg) rotateY(-6deg) scale(1.06);
    filter: drop-shadow(0 10px 8px rgba(19, 76, 64, 0.22));
}

body.modern-dashboard .pcoded-content .btn>i,
body.modern-dashboard .pcoded-content .btn>.fa,
body.modern-dashboard .pcoded-content .btn>.fas {
    display: inline-block;
    transform-origin: center center;
    transition: transform 0.28s cubic-bezier(0.34, 1.45, 0.64, 1), filter 0.28s ease;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.12));
    animation: md-dash-icon-spin-once-plain 0.7s cubic-bezier(0.34, 1.1, 0.64, 1) 2s 1 both;
}

body.modern-dashboard .pcoded-content .btn:hover>i,
body.modern-dashboard .pcoded-content .btn:focus>i,
body.modern-dashboard .pcoded-content .btn:hover>.fa,
body.modern-dashboard .pcoded-content .btn:focus>.fa,
body.modern-dashboard .pcoded-content .btn:hover>.fas,
body.modern-dashboard .pcoded-content .btn:focus>.fas {
    transform: perspective(80px) translateY(-2px) rotateX(-14deg) scale(1.12);
    filter: drop-shadow(0 4px 3px rgba(0, 0, 0, 0.18));
}

body.modern-dashboard .pcoded-header .m-header .mob-toggler i {
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 2px 2px rgba(19, 76, 64, 0.2));
    animation: md-dash-icon-spin-once-plain 0.7s cubic-bezier(0.34, 1.1, 0.64, 1) 2s 1 both;
    transition: transform 0.25s ease;
}

body.modern-dashboard .pcoded-header .m-header .mob-toggler:hover i {
    transform: scale(1.15) rotateZ(90deg);
}

@media (prefers-reduced-motion: reduce) {

    body.modern-dashboard .modern-topbar-icon-btn .feather,
    body.modern-dashboard .modern-topbar-icon-btn i,
    body.modern-dashboard .breadcrumb .feather,
    body.modern-dashboard .pcoded-navbar .pcoded-inner-navbar>li>a .pcoded-micon,
    body.modern-dashboard .pcoded-navbar .pcoded-inner-navbar>li>a .pcoded-micon i,
    body.modern-dashboard .pcoded-navbar .pcoded-inner-navbar>li>a .pcoded-micon .feather,
    body.modern-dashboard .pcoded-content .feather.f-30,
    body.modern-dashboard .pcoded-content .feather.f-36,
    body.modern-dashboard .social-card .social-icon,
    body.modern-dashboard .pcoded-content .btn>i,
    body.modern-dashboard .pcoded-content .btn>.fa,
    body.modern-dashboard .pcoded-content .btn>.fas,
    body.modern-dashboard .pcoded-header .m-header .mob-toggler i,
    body.modern-dashboard #mobile-collapse.modern-mobile-menu-toggle {
        animation: none !important;
    }

    body.modern-dashboard .modern-topbar-icon-btn,
    body.modern-dashboard .modern-topbar-icon-btn .feather,
    body.modern-dashboard .modern-topbar-icon-btn i,
    body.modern-dashboard .pcoded-navbar .pcoded-inner-navbar>li>a .pcoded-micon,
    body.modern-dashboard .pcoded-content .btn>i,
    body.modern-dashboard .pcoded-content .btn>.fa,
    body.modern-dashboard .pcoded-content .btn>.fas {
        transition-duration: 0.01ms !important;
    }
}

body.modern-dashboard .card {
    border: 0;
    border-radius: var(--md-radius-lg);
    background: var(--md-card);
    /* box-shadow: var(--md-shadow-card); */
    overflow: hidden;
}

body.modern-dashboard .card-header {
    background: transparent;
    border-bottom: 1px solid #edf2f8;
}

body.modern-dashboard .social-card {
    /* min-height: 160px; */
    background: linear-gradient(145deg, #ffffff 0%, var(--md-card-soft) 100%) !important;
    color: var(--md-text);
    box-shadow: var(--md-shadow-soft);
}

body.modern-dashboard .social-card .text-white,
body.modern-dashboard .social-card h4,
body.modern-dashboard .social-card h5 {
    color: var(--md-text) !important;
}

body.modern-dashboard .social-card .social-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    padding: 0 !important;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #f4fdf9 0%, #dff5ec 45%, #cfece3 100%);
    transform-style: preserve-3d;
    transform-origin: center center;
    box-shadow:
        0 8px 18px rgba(19, 76, 64, 0.14),
        0 2px 0 rgba(255, 255, 255, 0.85) inset,
        0 -4px 10px rgba(31, 139, 111, 0.08) inset;
    filter: drop-shadow(0 3px 3px rgba(19, 76, 64, 0.15));
    animation: md-dash-stat-tile-spin-once 0.9s cubic-bezier(0.34, 1.1, 0.64, 1) 2s 1 both;
    transition: transform 0.3s cubic-bezier(0.34, 1.45, 0.64, 1), box-shadow 0.3s ease, filter 0.3s ease;
}

body.modern-dashboard a.homepage-stat-card-link:hover .social-icon,
body.modern-dashboard .social-card:hover .social-icon {
    transform: translateY(-5px) rotateX(8deg) rotateY(-8deg) scale(1.06);
    box-shadow:
        0 14px 28px rgba(19, 76, 64, 0.2),
        0 2px 0 rgba(255, 255, 255, 1) inset;
    filter: drop-shadow(0 10px 8px rgba(19, 76, 64, 0.22));
}

body.modern-dashboard .social-card.bg-c-red .social-icon {
    color: var(--md-danger) !important;
}

body.modern-dashboard .social-card.bg-c-yellow .social-icon {
    color: var(--md-warn) !important;
}

body.modern-dashboard .social-card.bg-c-purple .social-icon {
    color: #6c73d6 !important;
}

body.modern-dashboard .homepage-stat-card-icon-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 68px;
}

body.modern-dashboard a.homepage-stat-card-link {
    display: block;
    color: inherit;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

body.modern-dashboard a.homepage-stat-card-link:hover {
    color: inherit;
    text-decoration: none;
    transform: translateY(-3px);
    box-shadow: 12px 12px 28px rgba(28, 38, 56, 0.1), -6px -6px 18px rgba(255, 255, 255, 0.95);
}

body.modern-dashboard a.homepage-stat-card-link:focus {
    outline: 2px solid rgba(31, 139, 111, 0.45);
    outline-offset: 3px;
}

body.modern-dashboard .social-card .download-icon {
    display: none !important;
}

body.modern-dashboard .btn,
body.modern-dashboard .btn-primary,
body.modern-dashboard .btn-warning {
    border-radius: 999px;
    border: 0;
    padding: 9px 18px;
    font-weight: 600;
}

body.modern-dashboard .btn-primary {
    background: linear-gradient(120deg, var(--md-accent) 0%, var(--md-accent-2) 100%);
    box-shadow: 0 8px 20px rgba(31, 139, 111, 0.25);
    color: #ffffff !important;
}

body.modern-dashboard .btn-primary:hover,
body.modern-dashboard .btn-primary:focus,
body.modern-dashboard .btn-primary:active {
    color: #ffffff !important;
    background: linear-gradient(120deg, #1a7a62 0%, #4ba690 100%);
}

body.modern-dashboard .btn-warning {
    background: linear-gradient(120deg, #f3b03d 0%, #f7c45f 100%);
    color: #3a2d0e !important;
}

body.modern-dashboard .btn-warning:hover,
body.modern-dashboard .btn-warning:focus,
body.modern-dashboard .btn-warning:active {
    color: #3a2d0e !important;
}

body.modern-dashboard .btn-outline-primary {
    border: 1px solid rgba(31, 139, 111, 0.45) !important;
    color: var(--md-accent) !important;
    background: rgba(255, 255, 255, 0.75) !important;
}

body.modern-dashboard .btn-outline-primary:hover,
body.modern-dashboard .btn-outline-primary:focus,
body.modern-dashboard .btn-outline-primary:active {
    color: #ffffff !important;
    background: var(--md-accent) !important;
}

body.modern-dashboard input.form-control,
body.modern-dashboard select.form-control,
body.modern-dashboard .select2-container--default .select2-selection--single {
    border: 0;
    border-radius: 14px !important;
    background: #f3f7fc;
    box-shadow: var(--md-shadow-inset);
    min-height: 42px;
}

/* Textareas: full “material” surface (fixes underline-only / flat look) */
body.modern-dashboard textarea.form-control,
body.modern-dashboard .modal textarea.form-control,
body.modern-dashboard .card textarea.form-control {
    min-height: 110px !important;
    height: auto !important;
    padding: 12px 14px !important;
    line-height: 1.55;
    color: var(--md-text) !important;
    border: 1px solid rgba(30, 42, 59, 0.06) !important;
    background: linear-gradient(165deg, #fbfdff 0%, #f1f6fc 100%) !important;
    box-shadow: var(--md-shadow-inset), 0 2px 8px rgba(42, 59, 84, 0.06) !important;
    resize: vertical;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

body.modern-dashboard textarea.form-control::placeholder,
body.modern-dashboard .modal textarea.form-control::placeholder {
    color: var(--md-muted);
    opacity: 0.88;
}

body.modern-dashboard textarea.form-control:focus,
body.modern-dashboard .modal textarea.form-control:focus {
    border-color: rgba(31, 139, 111, 0.35) !important;
    outline: 0 !important;
    box-shadow: var(--md-shadow-inset), 0 0 0 3px rgba(31, 139, 111, 0.18), 0 6px 18px rgba(42, 59, 84, 0.08) !important;
}

/* File inputs: styled “Choose file” control + soft container */
body.modern-dashboard input[type="file"].form-control,
body.modern-dashboard .modal input[type="file"].form-control,
body.modern-dashboard input[type="file"] {
    padding: 10px 12px !important;
    min-height: 48px !important;
    line-height: 1.4;
    border-radius: 14px !important;
    border: 1px solid rgba(30, 42, 59, 0.08) !important;
    background: linear-gradient(165deg, #fbfdff 0%, #eef4fb 100%) !important;
    box-shadow: var(--md-shadow-inset), 0 4px 14px rgba(42, 59, 84, 0.06) !important;
    color: var(--md-muted) !important;
    cursor: pointer;
}

body.modern-dashboard input[type="file"]::file-selector-button {
    margin-inline-end: 14px;
    padding: 8px 16px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(120deg, var(--md-accent) 0%, var(--md-accent-2) 100%);
    color: #fff !important;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(31, 139, 111, 0.28);
}

body.modern-dashboard input[type="file"]::file-selector-button:hover {
    filter: brightness(1.05);
}

body.modern-dashboard input[type="file"]::-webkit-file-upload-button {
    margin-inline-end: 14px;
    padding: 8px 16px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(120deg, var(--md-accent) 0%, var(--md-accent-2) 100%);
    color: #fff;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(31, 139, 111, 0.28);
}

body.modern-dashboard input[type="file"]::-moz-file-upload-button {
    margin-inline-end: 14px;
    padding: 8px 16px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(120deg, var(--md-accent) 0%, var(--md-accent-2) 100%);
    color: #fff;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(31, 139, 111, 0.28);
}

/* Generic table (non–DataTable): soft shell */
body.modern-dashboard .table:not(.dataTable) {
    border-radius: 14px;
    overflow: hidden;
    border: 0;
    box-shadow: 0 2px 10px rgba(30, 42, 59, 0.06);
}

body.modern-dashboard .table:not(.dataTable) thead th {
    background: #e9eef3;
    border: none;
    border-bottom: 1px solid #dde4ec;
    color: #2a3a4a;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 12px 14px;
}

body.modern-dashboard .table:not(.dataTable) td {
    border-color: #eef1f5;
    vertical-align: middle;
}

/* DataTables: card-style rows, calm header, teal accents (matches modern list UI) */
body.modern-dashboard .dataTables_wrapper {
    position: relative;
    /* Inherit font so RTL uses --md-font-ar from body; avoid Latin-first stack here */
    font-family: inherit;
    color: var(--md-text);
    background: linear-gradient(180deg, #e4e7eb 0%, #eceef1 100%);
    border: 1px solid rgba(30, 42, 59, 0.08);
    border-radius: 16px;
    padding: 10px 12px 4px;
    margin-bottom: 0.5rem;
}

/* nowrap / many columns: block wrapper stays viewport-wide while table is wider, so the
   gradient + header row look “cut off” after the first visible columns. Shrink-wrap the
   wrapper to the table’s intrinsic width (still at least 100% of the scroll container). */
body.modern-dashboard .table-responsive>.dataTables_wrapper {
    display: inline-block;
    min-width: 100%;
    vertical-align: top;
    box-sizing: border-box;
}

body.modern-dashboard .dataTables_wrapper .dataTables_length,
body.modern-dashboard .dataTables_wrapper .dataTables_filter {
    margin-bottom: 8px;
}

body.modern-dashboard .dataTables_wrapper .dataTables_length label,
body.modern-dashboard .dataTables_wrapper .dataTables_filter label {
    color: #4d5d72;
    font-size: 0.875rem;
    font-weight: 500;
}

body.modern-dashboard .dataTables_wrapper .dataTables_filter input,
body.modern-dashboard .dataTables_wrapper .dataTables_length select {
    border: 0 !important;
    border-radius: 12px !important;
    background: #f7f9fc !important;
    box-shadow: var(--md-shadow-inset);
    padding: 8px 12px;
    min-height: 38px;
    color: var(--md-text);
    margin-left: 0.4em;
}

html[dir="rtl"] body.modern-dashboard .dataTables_wrapper .dataTables_filter input {
    margin-left: 0;
    margin-right: 0.4em;
}

body.modern-dashboard .dataTables_wrapper .dataTables_length select {
    margin: 0 0.4em;
}

/* Card rows: no grid borders, spacing between “cards” */
body.modern-dashboard table.dataTable {
    width: 100% !important;
    margin: 0 auto !important;
    border: none !important;
    background: transparent !important;
    border-collapse: separate !important;
    border-spacing: 0 10px !important;
    border-radius: 0 !important;
    overflow: visible !important;
}

body.modern-dashboard table.dataTable thead th {
    background: #e4e8ed !important;
    border: none !important;
    color: #253443 !important;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 12px 14px 16px;
    border-bottom: none !important;
    box-shadow: none;
}

/* Sort arrows: clearer teal for active */
body.modern-dashboard table.dataTable thead .sorting,
body.modern-dashboard table.dataTable thead .sorting_asc,
body.modern-dashboard table.dataTable thead .sorting_desc,
body.modern-dashboard table.dataTable thead .sorting_asc_disabled,
body.modern-dashboard table.dataTable thead .sorting_desc_disabled {
    color: #253443;
    padding-right: 28px;
}

html[dir="rtl"] body.modern-dashboard table.dataTable thead .sorting,
html[dir="rtl"] body.modern-dashboard table.dataTable thead .sorting_asc,
html[dir="rtl"] body.modern-dashboard table.dataTable thead .sorting_desc {
    padding-left: 28px;
    padding-right: 14px;
}

body.modern-dashboard table.dataTable thead .sorting:before,
body.modern-dashboard table.dataTable thead .sorting_asc:before,
body.modern-dashboard table.dataTable thead .sorting_desc:before {
    right: 1em;
    color: #9aa8b5;
    opacity: 0.5 !important;
}

html[dir="rtl"] body.modern-dashboard table.dataTable thead .sorting:before,
html[dir="rtl"] body.modern-dashboard table.dataTable thead .sorting_asc:before,
html[dir="rtl"] body.modern-dashboard table.dataTable thead .sorting_desc:before {
    right: auto;
    left: 0.5em;
}

body.modern-dashboard table.dataTable thead .sorting:after,
body.modern-dashboard table.dataTable thead .sorting_asc:after,
body.modern-dashboard table.dataTable thead .sorting_desc:after {
    right: 0.4em;
    color: #9aa8b5;
    opacity: 0.5 !important;
}

html[dir="rtl"] body.modern-dashboard table.dataTable thead .sorting:after,
html[dir="rtl"] body.modern-dashboard table.dataTable thead .sorting_asc:after,
html[dir="rtl"] body.modern-dashboard table.dataTable thead .sorting_desc:after {
    right: auto;
    left: 1em;
}

body.modern-dashboard table.dataTable thead .sorting_asc:before,
body.modern-dashboard table.dataTable thead .sorting_desc:after {
    opacity: 1 !important;
    color: #3d8f7a;
}

body.modern-dashboard table.dataTable tfoot th,
body.modern-dashboard table.dataTable tfoot td,
body.modern-dashboard table.dataTable tfoot {
    border: 0;
}

/* Body: white “cards” + row shadow (drop-shadow on tr) */
body.modern-dashboard table.dataTable tbody tr {
    transition: filter 0.2s ease, transform 0.15s ease;
    filter: drop-shadow(0 2px 10px rgba(28, 40, 55, 0.08));
}

body.modern-dashboard table.dataTable tbody tr:hover {
    filter: drop-shadow(0 4px 14px rgba(28, 40, 55, 0.12));
}

body.modern-dashboard table.dataTable tbody tr td,
body.modern-dashboard table.dataTable.stripe tbody tr.odd td,
body.modern-dashboard table.dataTable.stripe tbody tr.even td,
body.modern-dashboard table.dataTable.display tbody tr.odd td,
body.modern-dashboard table.dataTable.display tbody tr.even td,
body.modern-dashboard table.dataTable.display tbody tr.odd:hover td,
body.modern-dashboard table.dataTable.display tbody tr.even:hover td {
    background: #fff !important;
    border: none !important;
    color: #3a4a5e;
    font-size: 0.9rem;
    line-height: 1.45;
    padding: 1rem 14px;
    vertical-align: middle;
}

body.modern-dashboard table.dataTable tbody tr:hover>td,
body.modern-dashboard table.dataTable.stripe tbody tr.odd:hover>td,
body.modern-dashboard table.dataTable.stripe tbody tr.even:hover>td,
body.modern-dashboard table.dataTable.display tbody tr:hover>td {
    background: #fbfdff !important;
}

/* Blacklisted clients row (clients page): vivid red */
body.modern-dashboard #clients-table tbody tr.client-blacklisted-row > td,
body.modern-dashboard #clients-table tbody tr.client-blacklisted-row.odd > td,
body.modern-dashboard #clients-table tbody tr.client-blacklisted-row.even > td,
body.modern-dashboard #clients-table.dataTable tbody tr.client-blacklisted-row > td {
    background: #ff3333 !important;
    color: #fff !important;
    border-color: #e62e2e !important;
}

body.modern-dashboard #clients-table tbody tr.client-blacklisted-row:hover > td,
body.modern-dashboard #clients-table.dataTable tbody tr.client-blacklisted-row:hover > td {
    background: #ff1a1a !important;
    color: #fff !important;
}

body.modern-dashboard #clients-table tbody tr.client-blacklisted-row {
    filter: drop-shadow(0 2px 6px rgba(255, 40, 40, 0.35));
}

/* Generic table-danger (other tables): keep message visible */
body.modern-dashboard table.dataTable:not(#clients-table) tbody tr.table-danger td,
body.modern-dashboard table.dataTable:not(#clients-table) tbody tr.table-danger.odd td,
body.modern-dashboard table.dataTable:not(#clients-table) tbody tr.table-danger.even td {
    background: #fdeff0 !important;
    color: #3a0d12 !important;
}

body.modern-dashboard table.dataTable:not(#clients-table) tbody tr.table-danger {
    filter: drop-shadow(0 2px 8px rgba(200, 60, 60, 0.15));
}

/* Empty / one-cell (e.g. colspan) message row */
body.modern-dashboard table.dataTable tbody tr td.dataTables_empty,
body.modern-dashboard table.dataTable tbody tr td:only-of-type {
    border-radius: 12px;
    text-align: center;
    color: #5f6d82;
    padding: 2.25rem 1rem;
}

body.modern-dashboard table.dataTable tbody tr td:first-child {
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}

html[dir="rtl"] body.modern-dashboard table.dataTable tbody tr td:first-child {
    border-radius: 0 12px 12px 0;
}

body.modern-dashboard table.dataTable tbody tr td:last-child {
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
}

html[dir="rtl"] body.modern-dashboard table.dataTable tbody tr td:last-child {
    border-radius: 12px 0 0 12px;
}

body.modern-dashboard table.dataTable.table-bordered tbody td,
body.modern-dashboard table.dataTable.table-bordered thead th,
body.modern-dashboard table.dataTable.table-bordered tfoot th {
    border: none !important;
}

/* Scroll layout: same spacing in body */
body.modern-dashboard .dataTables_scrollBody {
    background: transparent;
    border: none;
}

body.modern-dashboard .dataTables_scrollBody table.dataTable {
    border-spacing: 0 10px !important;
}

/* Footer: info + pagination */
body.modern-dashboard .dataTables_wrapper .dataTables_info {
    color: #4d5d72;
    font-size: 0.875rem;
    padding: 0.5rem 0.25rem 0.4rem;
}

/* Pagination: single row (RTL was wrapping “Next” to a second line) */
body.modern-dashboard .dataTables_wrapper .dataTables_paginate {
    margin: 0;
    padding: 0.35rem 0.1rem 0.45rem;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    text-align: end;
}

body.modern-dashboard .dataTables_wrapper .dataTables_paginate .pagination {
    margin: 0 !important;
    padding: 0.25rem 0 !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    width: max-content;
    min-height: 2.5rem;
    white-space: nowrap;
}

html[dir="rtl"] body.modern-dashboard .dataTables_wrapper .dataTables_paginate {
    text-align: start;
}

html[dir="rtl"] body.modern-dashboard .dataTables_wrapper .dataTables_paginate .pagination {
    justify-content: flex-start;
}

body.modern-dashboard .dataTables_wrapper .dataTables_paginate .page-item .page-link,
body.modern-dashboard .dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: 10px !important;
    border: 0 !important;
    margin: 0 2px !important;
    flex: 0 0 auto;
    min-width: 2rem;
    text-align: center;
    padding: 0.35rem 0.5rem;
    background: #e8ecef !important;
    color: #3a4a5e !important;
    font-size: 0.875rem;
    font-weight: 500;
}

body.modern-dashboard .dataTables_wrapper .dataTables_paginate .page-item.active .page-link,
body.modern-dashboard .dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: linear-gradient(120deg, var(--md-accent) 0%, var(--md-accent-2) 100%) !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(31, 139, 111, 0.35);
}

body.modern-dashboard .dataTables_wrapper .dataTables_paginate .page-item.disabled .page-link,
body.modern-dashboard .dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
body.modern-dashboard .dataTables_wrapper .dataTables_paginate .page-item:not(.active) .page-link[aria-disabled="true"] {
    opacity: 0.55;
}

/* Processing */
body.modern-dashboard .dataTables_wrapper .dataTables_processing {
    background: rgba(255, 255, 255, 0.9);
    border: 0;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(20, 30, 45, 0.1);
    color: var(--md-text);
    font-size: 0.9rem;
    font-weight: 600;
}

/* Checkboxes, switches, icon buttons in cells */
body.modern-dashboard table.dataTable .custom-control-input:checked~.custom-control-label::before {
    border-color: var(--md-accent);
    background: linear-gradient(120deg, var(--md-accent) 0%, var(--md-accent-2) 100%);
}

body.modern-dashboard table.dataTable .form-check-input.switch-primary:checked,
body.modern-dashboard table.dataTable .custom-toggle input:checked {
    background-color: var(--md-accent);
    border-color: var(--md-accent);
}

/* Icon / edit buttons in cells (circular, soft shadow) */
body.modern-dashboard table.dataTable .btn.btn-icon {
    width: 3rem;
    height: 3rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(30, 42, 55, 0.1);
    border: 0;
    vertical-align: middle;
}

body.modern-dashboard table.dataTable .btn.btn-icon.btn-primary,
body.modern-dashboard table.dataTable .btn.btn-icon.btn-success {
    background: linear-gradient(130deg, var(--md-accent) 0%, #3d9d88 100%);
    color: #fff;
}

body.modern-dashboard table.dataTable .btn.btn-icon.btn-primary:hover,
body.modern-dashboard table.dataTable .btn.btn-icon.btn-success:hover {
    filter: brightness(1.06);
    color: #fff;
}

body.modern-dashboard .modal-content {
    border: 0;
    border-radius: 18px;
    box-shadow: 0 18px 42px rgba(16, 26, 42, 0.2);
}

body.modern-dashboard .modal-header {
    border-bottom: 1px solid #edf1f7;
}

body.modern-dashboard #calendar {
    border-radius: 18px;
    background: linear-gradient(160deg, #ffffff 0%, #f8fbff 100%);
    /* box-shadow: var(--md-shadow-card); */
    padding: 6px;
}

body.modern-dashboard .fc-unthemed td,
body.modern-dashboard .fc-unthemed th {
    border-color: #e4e4e4;
}

/* Homepage calendar — Airbnb-style grid (see homepage.php .fc-airbnb-grid) */
body.modern-dashboard #calendar.fc-airbnb-grid .fc-day-grid-line-v,
body.modern-dashboard #calendar.fc-airbnb-grid .fc-day-grid-line-h {
    background: #dddddd;
}

body.modern-dashboard #calendar.fc-airbnb-grid .fc-body .fc-time-area .fc-event-container,
body.modern-dashboard #calendar.fc-airbnb-grid .fc-body .fc-time-area .fc-mirror-container {
    position: relative !important;
    z-index: 5 !important;
}

body.modern-dashboard #calendar.fc-airbnb-grid .fc-timeline-event,
body.modern-dashboard #calendar.fc-airbnb-grid .fc-timeline-event.fc-event {
    position: absolute !important;
    z-index: 6 !important;
}

body.modern-dashboard #calendar.fc-airbnb-grid .fc-body .fc-time-area .fc-scroller-canvas > .fc-bg {
    z-index: 1 !important;
}

body.modern-dashboard #calendar.fc-airbnb-grid .fc-body .fc-time-area .fc-scroller-canvas > .fc-content {
    position: relative !important;
    z-index: 2 !important;
}

body.modern-dashboard #calendar.fc-airbnb-grid .fc-day-grid-overlay {
    z-index: 2 !important;
}

body.modern-dashboard #calendar.fc-airbnb-grid .fc-timeline .fc-divider {
    width: 1px !important;
    border-style: solid !important;
    border-color: #dddddd !important;
    border-width: 0 0 0 1px !important;
}

body.modern-dashboard #calendar.fc-airbnb-grid .fc-unthemed td,
body.modern-dashboard #calendar.fc-airbnb-grid .fc-unthemed th {
    border-color: #dddddd;
}

body.modern-dashboard .fc-toolbar h2 {
    font-size: 1.1rem;
    color: var(--md-text);
    font-weight: 700;
}

body.modern-dashboard .fc-button {
    border: 0 !important;
    border-radius: 10px !important;
    box-shadow: none !important;
}

body.modern-dashboard .fc-button-primary {
    background: #e7f4f0 !important;
    color: var(--md-accent) !important;
}

body.modern-dashboard .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 42px;
    color: #344761;
}

body.modern-dashboard .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 42px;
}

body.modern-dashboard .select2-dropdown {
    border: 0;
    border-radius: 12px;
    box-shadow: 0 12px 28px rgba(22, 32, 47, 0.16);
}

body.modern-dashboard .dashboard-hero {
    border-radius: var(--md-radius-lg);
    padding: 18px 20px;
    margin-bottom: 16px;
    background: linear-gradient(140deg, #ffffff 0%, #f2f8fb 100%);
    box-shadow: var(--md-shadow-soft);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
}

body.modern-dashboard .dashboard-hero-title {
    font-size: 22px;
    font-weight: 800;
    margin: 0;
}

body.modern-dashboard .dashboard-hero-subtitle {
    color: var(--md-muted);
    margin: 4px 0 0;
}

body.modern-dashboard .dashboard-hero-actions {
    margin-inline-start: auto;
    display: flex;
    gap: 10px;
}

@media (max-width: 991px) {
    body.modern-dashboard .dashboard-hero-actions {
        margin-inline-start: 0;
        width: 100%;
    }
}

/* Homepage calendar card: filters left, actions right (RTL-aware) */
body.modern-dashboard .homepage-calendar-toolbar-wrap {
    padding-bottom: 12px;
}

body.modern-dashboard .homepage-calendar-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 16px;
    width: 100%;
}

body.modern-dashboard .homepage-calendar-toolbar-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    flex: 1 1 auto;
    min-width: 0;
}

body.modern-dashboard .homepage-calendar-toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

/* RTL: keep filters visually on the left, actions on the right */
html[dir="rtl"] body.modern-dashboard .homepage-calendar-toolbar-actions {
    order: 1;
}

html[dir="rtl"] body.modern-dashboard .homepage-calendar-toolbar-filters {
    order: 2;
}

body.modern-dashboard .homepage-calendar-toolbar-actions .btn {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
}

body.modern-dashboard .homepage-calendar-toolbar-inline {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

body.modern-dashboard .homepage-calendar-toolbar-inline-label {
    flex: 0 0 auto;
    margin: 0;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--md-accent);
    white-space: nowrap;
    line-height: 1.2;
}

body.modern-dashboard .homepage-calendar-toolbar-control {
    flex: 1 1 auto;
    min-width: 0;
}

body.modern-dashboard .homepage-calendar-toolbar-control .select2-container {
    width: 100% !important;
}

body.modern-dashboard .homepage-calendar-toolbar-country {
    flex: 0 1 220px;
    min-width: 160px;
}

body.modern-dashboard .homepage-calendar-toolbar-search-field {
    flex: 1 1 240px;
    min-width: 200px;
}

body.modern-dashboard .homepage-calendar-toolbar-search {
    flex: 0 0 auto;
}

body.modern-dashboard .homepage-calendar-toolbar-search .btn {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
}

body.modern-dashboard .homepage-calendar-toolbar-hint-below {
    font-size: 0.75rem;
    line-height: 1.35;
    opacity: 0.92;
}

@media (min-width: 992px) {
    body.modern-dashboard .homepage-calendar-toolbar {
        flex-wrap: nowrap;
    }

    body.modern-dashboard .homepage-calendar-toolbar-filters {
        flex-wrap: nowrap;
    }

    body.modern-dashboard .homepage-calendar-toolbar-country {
        flex: 0 0 200px;
        max-width: 220px;
    }

    body.modern-dashboard .homepage-calendar-toolbar-search-field {
        flex: 1 1 0;
        max-width: 520px;
        min-width: 220px;
    }
}

body.modern-auth {
    min-height: 100vh;
    background: radial-gradient(circle at 10% 0%, #f6fbff 0%, #edf2f8 68%);
    display: flex;
    align-items: center;
    justify-content: center;
    /* padding: 20px; */
    color: var(--md-text);
}

body.modern-auth .auth-wrapper {
    width: min(480px, 96vw);
}

body.modern-auth .auth-content .card {
    border: 0;
    border-radius: 24px;
    box-shadow: var(--md-shadow-soft);
    background: linear-gradient(150deg, #ffffff 0%, #f4f8fd 100%);
}

body.modern-auth .form-control,
body.modern-auth textarea.form-control {
    border: 0;
    border-radius: 14px;
    background: #f3f7fc;
    box-shadow: var(--md-shadow-inset);
}

body.modern-auth textarea.form-control {
    min-height: 100px;
    padding: 12px 14px !important;
    border: 1px solid rgba(30, 42, 59, 0.06) !important;
    background: linear-gradient(165deg, #fbfdff 0%, #f1f6fc 100%) !important;
    box-shadow: var(--md-shadow-inset), 0 2px 8px rgba(42, 59, 84, 0.06) !important;
    resize: vertical;
}

body.modern-auth input[type="file"] {
    padding: 10px 12px !important;
    border-radius: 14px !important;
    border: 1px solid rgba(30, 42, 59, 0.08) !important;
    background: linear-gradient(165deg, #fbfdff 0%, #eef4fb 100%) !important;
    box-shadow: var(--md-shadow-inset), 0 4px 14px rgba(42, 59, 84, 0.06) !important;
}

body.modern-auth input[type="file"]::file-selector-button,
body.modern-auth input[type="file"]::-webkit-file-upload-button,
body.modern-auth input[type="file"]::-moz-file-upload-button {
    margin-inline-end: 12px;
    padding: 8px 14px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(120deg, var(--md-accent) 0%, var(--md-accent-2) 100%);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}

body.modern-auth .btn-primary {
    background: linear-gradient(120deg, var(--md-accent) 0%, var(--md-accent-2) 100%);
    color: #fff !important;
    border: 0;
}

body.modern-auth .btn-outline-primary {
    border-radius: 999px;
    border: 1px solid rgba(31, 139, 111, 0.45);
    color: var(--md-accent);
}

body.modern-auth a.modern-auth-back-link {
    color: var(--md-accent);
    font-weight: 500;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

body.modern-auth a.modern-auth-back-link:hover,
body.modern-auth a.modern-auth-back-link:focus {
    color: var(--md-accent-2, #0d5c4a);
    border-bottom-color: rgba(31, 139, 111, 0.4);
    outline: none;
}

/* App footer: material bar (dashboard shell) */
body.modern-dashboard .modern-app-footer {
    margin-top: auto;
}

body.modern-dashboard .modern-app-footer .modern-app-footer-bar {
    position: relative;
    text-align: center;
    background: linear-gradient(180deg, rgba(31, 139, 111, 0.14) 0%, rgba(25, 110, 90, 0.22) 100%) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.45);
    box-shadow:
        0 -1px 0 rgba(0, 0, 0, 0.06) inset,
        0 -8px 32px rgba(19, 76, 64, 0.1);
    padding: 14px 20px 16px !important;
    backdrop-filter: blur(6px);
}

body.modern-dashboard .modern-app-footer .modern-app-footer-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.25rem 0.65rem;
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    line-height: 1.5;
    color: #15322b;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body.modern-dashboard .modern-app-footer .modern-app-footer-copy {
    opacity: 0.95;
}

body.modern-dashboard .modern-app-footer .modern-app-footer-credit {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}

body.modern-dashboard .modern-app-footer .modern-app-footer-credit-label {
    color: #1e2a3b;
    font-weight: 500;
    opacity: 0.88;
}

body.modern-dashboard .modern-app-footer .modern-app-footer-brand {
    font-weight: 700;
    color: #e85a2c !important;
    text-decoration: none !important;
    border-bottom: 1px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

body.modern-dashboard .modern-app-footer .modern-app-footer-brand:hover,
body.modern-dashboard .modern-app-footer .modern-app-footer-brand:focus {
    color: #ff6b3d !important;
    border-bottom-color: rgba(232, 90, 44, 0.4);
    transform: translateY(-1px);
    outline: none;
}