html, body, * {
    font-family: "Poppins", 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

html, body {
    background-color: #ededf0;
}

/* ============================================
   NAVIGATION MENU STYLES - Shared across all portals
   ============================================ */
body {
    margin: 0;
    padding: 0;
}

.nav-side-menu {
    left: 10px;
    top: 56px;
    width: 250px;
    height: 100%;
    background-color: #2e353d;
    color: #e1ffff;
    position: fixed;
    overflow-y: auto;
    font-family: Arial;
    font-size: 13px;
}

.menu-list {
    padding: 0;
}

.menu-content {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

    /* Top-level items: reserve border space */
    .menu-content > li {
        border-left: 3px solid transparent;
        border-bottom: 1px solid #23282e;
    }

        /* Top-level hover */
        .menu-content > li:hover {
            border-left-color: #F25252;
            background-color: #4f5b69;
        }

/* Submenu items: reserve border space too */
.sub-menu li {
    border-left: 3px solid transparent;
    margin-left: 2px;
}

    /* Submenu hover */
    .sub-menu li:hover {
        border-left-color: #f97c7c;
        background-color: #4f5b69;
        margin-left: 2px;
    }

/* Link styling for all items */
.menu-content li > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    color: #e1ffff;
    text-decoration: none;
    font-size: 13px;
    line-height: 1.3;
}

    .menu-content li a:hover {
        text-decoration: none;
    }

/* Icon styles */
.menu-content li a i.fa {
    width: 18px;
    margin-right: 8px;
    text-align: center;
    font-size: 13px;
}

/* Text spacing */
.menu-content li a span {
    flex-grow: 1;
    margin-left: 4px;
}

/* Submenu container */
.sub-menu {
    background-color: #181c20;
    list-style-type: none;
    padding: 0;
    margin: 0;
}

    /* Submenu links */
    .sub-menu li a {
        padding: 7px 14px 7px 32px;
        font-size: 12.5px;
        display: block;
        color: #e1ffff;
        text-decoration: none;
        line-height: 1.25;
    }

    /* Deeper nested submenu */
    .sub-menu .sub-menu {
        background-color: #1c1f24;
    }

        .sub-menu .sub-menu li a {
            padding-left: 44px;
            font-size: 12px;
        }

/* Arrow icon rotation */
.arrow {
    font-size: 11px;
    transition: transform 0.2s ease;
}

/* Navbar toggler */
.navbar-toggler {
    width: 38px;
    height: 38px;
    padding: 8px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    border: none;
    transition: background-color 0.2s ease;
}

    .navbar-toggler:hover,
    .navbar-toggler:focus {
        background-color: rgba(255, 255, 255, 0.15);
        outline: none;
    }

/* Hamburger icon size */
.navbar-toggler-icon {
    width: 22px;
    height: 18px;
}

/* Top row bar */
.top-row {
    width: 280px;
    height: 3.5rem;
    background-color: #121212;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-left: 1rem;
    padding-right: 1rem;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1030;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: width 0.3s, height 0.3s, padding 0.3s, background 0.3s;
}

    .top-row.collapsed {
        width: 250px;
        height: 3.5rem;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
        background-color: #121212;
        justify-content: flex-start;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.10);
        border-radius: 16px;
        transition: width 0.3s, height 0.3s, padding 0.3s, background 0.3s;
    }

        .top-row.collapsed .navbar-brand {
            max-width: 100px;
            font-size: 1.1rem;
        }

    .top-row .navbar-brand {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 80px;
        font-size: 1.1rem;
        transition: max-width 0.3s, font-size 0.3s;
    }

    .top-row:not(.collapsed) .navbar-brand {
        max-width: none;
        font-size: 1.3rem;
    }

    .top-row .navbar-brand.d-none {
        display: none !important;
    }

.navbar-brand {
    font-size: 1.3rem;
    font-weight: 700;
    color: #f8f9fa;
    user-select: none;
    transition: opacity 0.3s;
}

/* Sidebar container */
.nav-scrollable {
    width: 250px;
    background-color: #121212;
    overflow-y: hidden;
    height: 100vh;
    min-height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    padding-top: 4rem;
    z-index: 1020;
}

    .nav-scrollable.collapsed {
        transform: translateX(-100%);
    }

.sidebar-close-btn {
    align-self: flex-end;
    margin: 0.5rem 1rem;
    background: transparent;
    border: none;
    color: #ddd;
    font-size: 1.6rem;
    cursor: pointer;
    transition: color 0.2s ease;
}

    .sidebar-close-btn:hover,
    .sidebar-close-btn:focus {
        color: white;
        outline: none;
    }

/* Nav items */
.nav-item {
    font-size: 0.8rem;
    padding: 0.2rem 1rem;
    user-select: none;
    transition: background-color 0.3s, color 0.3s, box-shadow 0.3s, transform 0.3s;
}

    .nav-item:first-of-type {
        margin-top: 0.5rem;
    }

    .nav-item:last-of-type {
        margin-bottom: 0.5rem;
    }

    /* Nav link styling */
    .nav-item ::deep .nav-link {
        font-size: 0.8rem;
        display: flex;
        width: 120%;
        align-items: center;
        justify-content: flex-start;
        gap: 0.4rem;
        border-radius: 10px;
        padding: 0.5rem 1rem;
        background-color: rgba(255, 255, 255, 0.07);
        color: #e0e0e0;
        text-decoration: none;
        font-weight: 400;
        transition: background-color 0.3s cubic-bezier(0.4,0,0.2,1), color 0.3s cubic-bezier(0.4,0,0.2,1), box-shadow 0.3s cubic-bezier(0.4,0,0.2,1), transform 0.3s cubic-bezier(0.4,0,0.2,1);
        white-space: nowrap;
        box-shadow: none !important;
        white-space: normal !important;
        word-break: break-word !important;
        overflow-wrap: break-word !important;
        margin-left: -1rem;
        border: 0.5px solid rgba(255, 255, 255, 0.07);
    }

        .nav-item ::deep .nav-link:hover,
        .nav-item ::deep .nav-link:focus {
            background-color: #20222B;
            color: floralwhite;
            outline: none;
            transition: background-color 0.3s cubic-bezier(0.4,0,0.2,1), color 0.3s cubic-bezier(0.4,0,0.2,1), box-shadow 0.3s cubic-bezier(0.4,0,0.2,1), transform 0.3s cubic-bezier(0.4,0,0.2,1);
            box-shadow: none !important;
        }

        .nav-item ::deep .nav-link.active {
            background-color: #fff;
            color: #111;
            font-weight: 600;
            box-shadow: none !important;
        }

    .nav-item ::deep .nav-link-logout {
        background-color: #d32f2f;
        color: #fff;
        font-weight: 700;
        transition: background-color 0.3s cubic-bezier(0.4,0,0.2,1), color 0.3s cubic-bezier(0.4,0,0.2,1), box-shadow 0.3s cubic-bezier(0.4,0,0.2,1), transform 0.3s cubic-bezier(0.4,0,0.2,1);
    }

        .nav-item ::deep .nav-link-logout:hover,
        .nav-item ::deep .nav-link-logout:focus {
            background-color: #b71c1c;
            color: #fff;
        }

    /* Dropdown menu */
    .nav-item .dropdown-menu {
        background-color: transparent;
        border: none;
        border-radius: 10px;
        padding: 0.75rem 1.5rem;
        border-radius: 0;
        margin-top: 1rem;
        min-width: 80%;
        max-width: 280px;
        box-shadow: none !important;
        white-space: normal;
        word-wrap: break-word;
        overflow-wrap: break-word;
        transition: background-color 0.3s cubic-bezier(0.4,0,0.2,1), color 0.3s cubic-bezier(0.4,0,0.2,1), box-shadow 0.3s cubic-bezier(0.4,0,0.2,1), transform 0.3s cubic-bezier(0.4,0,0.2,1);
    }

        /* Dropdown menu links */
        .nav-item .dropdown-menu a {
            padding: 0.5rem 1.5rem;
            display: block;
            color: #ddd;
            text-decoration: none;
            transition: background-color 0.3s cubic-bezier(0.4,0,0.2,1), color 0.3s cubic-bezier(0.4,0,0.2,1), box-shadow 0.3s cubic-bezier(0.4,0,0.2,1), transform 0.3s cubic-bezier(0.4,0,0.2,1);
            border-radius: 8px;
            font-weight: 600;
            box-shadow: none !important;
            white-space: normal;
            word-break: break-word;
            overflow-wrap: break-word;
        }

            .nav-item .dropdown-menu a:hover,
            .nav-item .dropdown-menu a:focus {
                background-color: rgba(255, 255, 255, 0.25);
                color: #fff;
                outline: none;
                box-shadow: none !important;
            }

            .nav-item .dropdown-menu a.active {
                background-color: #fff;
                color: #111;
                font-weight: 700;
                box-shadow: none !important;
            }

/* Dropdown arrow rotation */
.dropdown-toggle::after {
    margin-left: 0.6rem;
    vertical-align: 0.15em;
    transition: transform 0.3s ease;
}

.nav-item.dropdown.show > a.dropdown-toggle::after {
    transform: rotate(180deg);
}

/* Sidebar always visible on wider screens */
@media (min-width: 641px) {
    .navbar-toggler {
        display: block;
    }

    .nav-scrollable {
        position: fixed;
    }
}

/* Responsive for smaller screens */
@media (max-width: 640px) {
    .top-row {
        width: 100vw;
    }

        .top-row.collapsed {
            width: 60px;
        }
}

/* ============================================
   CONTROL PROPERTIES PANEL - COMPACT TABS
   ============================================ */

/* Force navigation tabs to wrap when they don't fit */
.nav-tabs.flex-wrap {
    flex-wrap: wrap !important;
}

.nav-tabs.flex-wrap .nav-item {
    flex-shrink: 0;
}

.nav-tabs.flex-wrap .nav-link {
    white-space: nowrap;
}

/* Make navigation tabs smaller and less bulky */
.nav-tabs-sm .nav-link {
    font-size: 10px !important;         /* Very small text */
    padding: 3px 6px !important;        /* Minimal padding */
    line-height: 1 !important;          /* Very tight line height */
    font-weight: 500 !important;        /* Medium weight for readability */
    min-height: auto !important;        /* Remove min-height constraint */
}

.nav-tabs-sm {
    margin-bottom: 0.5rem !important;   /* Reduced bottom margin */
    border-bottom-width: 1px !important;
    min-height: auto !important;
}

.nav-tabs-sm .nav-item {
    margin-bottom: 0 !important;
    margin-right: 2px !important;       /* Small gap between tabs */
}
