/********** Template CSS **********/
:root {
    --primary: #1b2944;
    --action: #4b8bec;
    --danger: #b81717;
    --success: #38a94a;
    --light: #f8f7ff;
    --dark: #1d2844;
}

.nu-flex-grid {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    min-height: 0 !important;
}

html, body {
    overflow-x: hidden !important;
}

.dashminbody {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}


.dashminfooter {
    width: 100%;
    flex-shrink: 0;
}

.back-to-top {
    position: fixed;
    display: none;
    right: 45px;
    bottom: 45px;
    z-index: 99;
}


/*** Spinner ***/
#spinner {
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease-out, visibility 0s linear .5s;
    z-index: 99999;
}

#spinner.show {
    transition: opacity .5s ease-out, visibility 0s linear 0s;
    visibility: visible;
    opacity: 1;
}


/*** Button ***/
.btn {
    transition: .5s;
}

.btn.btn-primary {
    color: #FFFFFF;
}

.btn-square {
    width: 38px;
    height: 38px;
}

.btn-sm-square {
    width: 32px;
    height: 32px;
}

.btn-lg-square {
    width: 48px;
    height: 48px;
}

.btn-square,
.btn-sm-square,
.btn-lg-square {
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: normal;
    border-radius: 50px;
}


/*** Layout ***/
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 300px;
    height: 100vh;
    background: var(--light);
    transition: 0.5s;
    z-index: 999;
}

.content {
    margin-left: 300px;
    background: #FFFFFF;
    transition: 0.5s;
    display: flex; /* REQUIRED */
    flex-direction: column; /* REQUIRED */
    height: 100vh; /* REQUIRED */
    min-height: 0; /* REQUIRED */
    overflow: hidden;
}

@media (min-width: 992px) {
    .sidebar {
        margin-left: 0;
    }

    .sidebar.open {
        margin-left: -300px;
    }

    .content {
        width: calc(100% - 250px);
    }

    .content.open {
        width: 100%;
        margin-left: 0;
    }
}

@media (max-width: 991.98px) {
    .sidebar {
        margin-left: -250px;
    }

    .sidebar.open {
        margin-left: 0;
    }

    .content {
        width: 100%;
        margin-left: 0;
    }
}


/*** Navbar ***/
.sidebar .navbar .navbar-nav .nav-link {
    padding: 5px 10px;
    color: var(--dark);
    font-weight: 500;
    border-left: 3px solid var(--light);
    border-radius: 0 15px 15px 0;
    outline: none;
}

.sidebar .navbar .navbar-nav .nav-link:hover,
.sidebar .navbar .navbar-nav .nav-link.active {
    color: var(--primary);
    background: #FFFFFF;
    border-color: var(--primary);
}

.sidebar .navbar .navbar-nav .nav-link i {
    width: 35px;
    height: 35px;
    font-size: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #FFFFFF;
    border-radius: 40px;
}

.sidebar .navbar .navbar-nav .nav-link:hover i,
.sidebar .navbar .navbar-nav .nav-link.active i {
    background: var(--light);
}

.sidebar .navbar .dropdown-toggle::after {
    position: absolute;
    top: 15px;
    right: 15px;
    border: none;
    content: "\f107";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    transition: .5s;
}

.sidebar .navbar .dropdown-toggle[aria-expanded=true]::after {
    transform: rotate(-180deg);
}

.sidebar .navbar .dropdown-item {
    padding-left: 25px;
    border-radius: 0 30px 30px 0;
}

.content .navbar .navbar-nav .nav-link {
    margin-left: 25px;
    padding: 12px 0;
    color: var(--dark);
    outline: none;
}

.content .navbar .navbar-nav .nav-link:hover,
.content .navbar .navbar-nav .nav-link.active {
    color: var(--primary);
}

.content .navbar .sidebar-toggler,
.content .navbar .navbar-nav .nav-link i {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #FFFFFF;
    border-radius: 40px;
}

.content .navbar .dropdown-toggle::after {
    margin-left: 6px;
    vertical-align: middle;
    border: none;
    content: "\f107";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    transition: .5s;
}

.content .navbar .dropdown-toggle[aria-expanded=true]::after {
    transform: rotate(-180deg);
}

@media (max-width: 575.98px) {
    .content .navbar .navbar-nav .nav-link {
        margin-left: 15px;
    }
}


/*** Date Picker ***/
.bootstrap-datetimepicker-widget.bottom {
    top: auto !important;
}

.bootstrap-datetimepicker-widget .table * {
    border-bottom-width: 0px;
}

.bootstrap-datetimepicker-widget .table th {
    font-weight: 500;
}

.bootstrap-datetimepicker-widget.dropdown-menu {
    padding: 10px;
    border-radius: 2px;
}

.bootstrap-datetimepicker-widget table td.active,
.bootstrap-datetimepicker-widget table td.active:hover {
    background: var(--primary);
}

.bootstrap-datetimepicker-widget table td.today::before {
    border-bottom-color: var(--primary);
}

.text-primary {
    color: var(--primary) !important;
}

a {
    color: var(--primary);
}


h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--primary) !important;
}


/* Disable/ Enable Gird */
.disablegrid {
    pointer-events: none;
    opacity: 0.4;
}

.wrapper {
    cursor: not-allowed;
}

.custom-main-content-body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100vh; /* Full viewport height */
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden; /* Prevents scrollbars */
}

.custom-row-cards {
    width: 100%;
    height: 100%;
}

.custom-full-height-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.sidepane-container {
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.sidepane-title {
    flex: 0 0 auto;
    padding: 8px 10px;
    border-bottom: 1px solid #dcdcdc;
    background: #fff;
}


.sidepane-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    height: 100%;
    width: 100%;
    padding-top: 0.5rem;
}

.sidepane-body.no-padding-top {
    padding-top: 0;
}

/* Floating "Add Panel" button */
.fab-add-panel {
    position: fixed;
    top: 90px; /* adjust to sit below your header */
    right: 24px; /* or inset-inline-end if you prefer RTL-safe */
    z-index: 10001; /* higher than #back-to-top (10000) */

    padding: 10px 14px;
    border-radius: 999px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

/* optional: smaller on mobile */
@media (max-width: 576px) {
    .fab-add-panel {
        top: 70px;
        right: 12px;
        padding: 8px 12px;
        font-size: 0.9rem;
    }
}

/* Put this on .e-panel-container */
.panel-fill {
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    min-height: 0; /* IMPORTANT: allows children to shrink */
    overflow: hidden; /* clips anything that tries to escape */
}

/* Put this on the content div inside the panel */
.panel-content {
    flex: 1 1 auto; /* take remaining space */
    min-height: 0; /* IMPORTANT: allows scrolling */
    width: 100%;
    height: 100%;
    overflow: auto; /* scroll instead of overflowing */
}

/* make the section scroll */
.control-section {
    height: calc(100vh - 70px); /* adjust 70px to your header height */
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
}

.home-logo {
    transition: transform 0.15s ease;
}

.home-logo:hover {
    transform: scale(1.15);
}

/* ================================
   USER AVATAR (INITIALS ONLY)
   ================================ */
.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(24, 40, 64, 0.15);
    background: #f1f5f9;
    color: var(--primary) !important;
    font-weight: 700;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.04em;
}


/* Tighten dropdown positioning */
.user-dropdown {
    margin-top: 0px !important; /* removes big gap */
}

.navbar .dropdown-toggle:hover .user-avatar {
    transform: scale(1.06);
    transition: all 0.15s ease;
}

/* Ensure EJ2 tooltips are above the navbar */
.e-tooltip-wrap,
.e-popup.e-tooltip-wrap {
    z-index: 2000 !important;
}

/* ================================
   NAVBAR ICONS (CHAT / NOTIFICATIONS)
   ================================ */
/* Anchor badge to the Font Awesome icon, not the whole 38x38 circle */
.navbar .navbar-nav .nav-link.nav-icon-link .nav-fa-wrap {
    position: relative;
    display: inline-block;
    line-height: 1;
}

/* Override Syncfusion default badge margins (margin:auto) */
.navbar .navbar-nav .nav-link.nav-icon-link .nav-fa-wrap > .e-badge {
    margin: 0 !important;
}

/* Badge positioning on top-right of the FA icon */
.navbar .navbar-nav .nav-link.nav-icon-link .nav-fa-wrap > .e-badge {
    position: absolute !important;
    top: 0.3em !important;
    right: -0.5em !important;
    left: auto !important;
    transform: none !important;
    min-width: 20px;
    height: 20px;
    line-height: 20px;
    font-size: 11px;
    font-weight: 700;
    padding: 0 5px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 2px #f1f5f9;
}


/* ===============================
   Notification ListView (Row UI)
   =============================== */

/* Row (was card) */
.notif-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    margin: 0; /* remove spacing between items */
    border: 0; /* no full border */
    border-bottom: 1px solid #e9ecef; /* subtle separator */
    border-radius: 0; /* no rounded card */
    background: #fff;
}

/* Remove separator on last row if you want (works if last-child is the row) */
.notif-card:last-child {
    border-bottom: 0;
}

/* Subtle hover like the first screenshot */
.notif-card:hover {
    background: #f8f9fa;
}

/* Title */
.notif-text {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.95rem;
    line-height: 1.25rem;
    color: #212529;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Date/time */
.notif-dt {
    flex: 0 0 auto;
    min-width: 60px;
    font-size: 0.8rem;
    color: #6c757d;
    text-align: right;
    line-height: 1.1rem;
}

/* Actions container */
.notif-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Action buttons (no bubble background, simple like screenshot 1) */
.notif-btn {
    border: 0;
    background: transparent;
    padding: 4px; /* smaller */
    color: #6c757d;
    line-height: 1;
    border-radius: 6px; /* tiny rounding */
}

.notif-btn:hover {
    background: transparent; /* no pill hover */
    color: #000;
}

/* ===============================
   Scroll container in dropdown
   =============================== */
.notif-list-scroll {
    max-height: 320px;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Make EJ2 list items not add padding around our row */
.notif-list-scroll .e-listview .e-list-item {
    height: auto;
    padding: 0;
}

/* Optional: remove EJ2 default item hover background (we handle hover) */
.notif-list-scroll .e-listview .e-list-item:hover {
    background: transparent;
}

/* ===============================
   Tab header (template)
   =============================== */
.notif-tab-header {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.notif-tab-icon {
    font-size: 0.9rem;
    color: #6c757d;
}

.e-tab .e-toolbar-item.e-active .notif-tab-icon {
    color: #000;
}


/* ===============================
   Chat ListView (Row UI)
   =============================== */

/* Row (was card) */
.chat-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    margin: 0; /* remove spacing between items */
    border: 0; /* no full border */
    border-bottom: 1px solid #e9ecef; /* subtle separator */
    border-radius: 0; /* no rounded card */
    background: #fff;
}

/* Remove separator on last row if you want (works if last-child is the row) */
.chat-card:last-child {
    border-bottom: 0;
}

/* Subtle hover like the first screenshot */
.chat-card:hover {
    background: #f8f9fa;
}

/* Title */
.chat-text {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.95rem;
    line-height: 1.25rem;
    color: #212529;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Date/time */
.chat-dt {
    flex: 0 0 auto;
    min-width: 60px;
    font-size: 0.8rem;
    color: #6c757d;
    text-align: right;
    line-height: 1.1rem;
}

/* Actions container */
.chat-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Action buttons (no bubble background, simple like screenshot 1) */
.chat-btn {
    border: 0;
    background: transparent;
    padding: 4px; /* smaller */
    color: #6c757d;
    line-height: 1;
    border-radius: 6px; /* tiny rounding */
}

.chat-btn:hover {
    background: transparent; /* no pill hover */
    color: #000;
}

/* ===============================
   Scroll container in dropdown
   =============================== */
.chat-list-scroll {
    max-height: 320px;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Make EJ2 list items not add padding around our row */
.chat-list-scroll .e-listview .e-list-item {
    height: auto;
    padding: 0;
}

/* Optional: remove EJ2 default item hover background (we handle hover) */
.chat-list-scroll .e-listview .e-list-item:hover {
    background: transparent;
}

/* ===============================
   Tab header (template)
   =============================== */
.chat-tab-header {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.chat-tab-icon {
    font-size: 0.9rem;
    color: #6c757d;
}

.e-tab .e-toolbar-item.e-active .chat-tab-icon {
    color: #000;
}

/*** Collapsed Sidebar - Icon Only ***/
.sidebar.sidebar-collapsed {
    width: 70px;
}

.sidebar.sidebar-collapsed .sidebar-logo-img img {
    display: none;
}

/* Collapsed Sidebar - Icon Only (applies to ALL sidebar nav links) */
.sidebar.sidebar-collapsed .navbar-nav a.nav-link {
    padding: 12px !important;
    text-align: center;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0;
}

.sidebar.sidebar-collapsed .navbar-nav a.nav-link i {
    font-size: 18px;
    width: auto;
    height: auto;
    margin: 0 !important;
}

.sidebar.sidebar-collapsed .navbar-nav a.nav-link .fa-chevron-down {
    display: none !important;
}

.sidebar.sidebar-collapsed .collapse {
    display: none !important;
}

.sidebar.sidebar-collapsed .navbar-nav > .nav-item {
    width: 100%;
}

@media (min-width: 992px) {
    .sidebar.sidebar-collapsed {
        margin-left: 0;
    }

    .content.sidebar-collapsed {
        width: calc(100% - 80px);
        margin-left: 80px;
    }
}

.SidebarTabHide {
    display: none !important;
}

/* Allow tooltips to escape the sidebar scroll container */
.sidebar.sidebar-collapsed #navbarnav {
    overflow-x: visible !important; /* overrides inline overflow-x:hidden */
    overflow-y: auto !important; /* keep scrolling */
}

/* Sometimes the inner container also clips */
.sidebar.sidebar-collapsed #mainMenuContainer {
    overflow: visible !important;
}

/* Ensure sidebar can show overflow */
.sidebar.sidebar-collapsed {
    overflow: visible !important;
}

/* Prevent 2-line wrapping in all sidebar links */
.sidebar .navbar .navbar-nav .nav-link .span-text {
    min-width: 0; /* IMPORTANT for flex truncation */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Time Sheet Logger 
    Clock animation styles (only affects icons with .nav-clock) 
*/
@keyframes navClockTick {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.nav-clock {
    display: inline-block;
    transform-origin: 50% 50%;
    animation: navClockTick 60s steps(60, end) infinite;
}

@media (prefers-reduced-motion: reduce) {
    .nav-clock {
        animation: none;
    }
}

@keyframes navPillPulse {
    0% {
        transform: scale(1);
    }

    30% {
        transform: scale(1.03);
    }

    100% {
        transform: scale(1);
    }
}

.nav-pill-pulse {
    animation: navPillPulse 320ms ease-out;
}

/* Hover label "tooltip" when sidebar is collapsed */
.sidebar.sidebar-collapsed .navbar-nav a.nav-link {
    position: relative; /* anchor the tooltip */
}

.sidebar.sidebar-collapsed .navbar-nav a.nav-link:hover::after {
    content: attr(data-label);
    display: block; /* IMPORTANT */
    line-height: 1.2; /* IMPORTANT */
    pointer-events: none; /* so hover doesn't flicker */
    position: absolute;
    left: 70px;
    top: 50%;
    transform: translateY(-50%);
    white-space: nowrap;
    background: #fff;
    color: var(--primary);
    padding: 8px 12px;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
    z-index: 10000;
    font-size: 14px;
    border: 1px solid rgba(27, 41, 68, 0.12);
}

/* Optional: small arrow */
.sidebar.sidebar-collapsed .navbar-nav a.nav-link:hover::before {
    content: "";
    position: absolute;
    left: 64px;
    top: 50%;
    transform: translateY(-50%);
    border: 7px solid transparent;
    border-right-color: #fff;
    z-index: 10001;
}

.action-btn {
    background-color: #e9ecef; /* soft gray */
    border: none;
    transition: all 0.2s ease-in-out;
}

.action-btn:hover {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}