.top-bar {
    background-color: #198754;
}

@media (max-width: 575.98px) {
    .top-bar .container-fluid {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .top-bar-left {
        flex-direction: column;
        gap: 5px;
    }

    .top-bar-left span {
        border: none !important;
        padding-left: 0 !important;
        margin: 0;
        justify-content: center;
    }

    .top-bar-right {
        margin-top: 5px;
    }
}

.navbar {
    background-color: #156B3B;
}

.navbar-nav .nav-link {
    position: relative;
    padding: 0.5rem 1rem;
    color: #fff;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.navbar-nav .nav-link .nav-text {
    position: relative;
}

.navbar-nav .nav-link .nav-text::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    left: 0;
    bottom: -2px;
    background-color: #fff;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.navbar-nav .nav-link:hover .nav-text::after,
.navbar-nav .nav-link.active .nav-text::after {
    transform: scaleX(1);
}

.navbar-nav .nav-link .caret {
    font-size: 0.7rem;
    margin-left: 0.25rem;
    vertical-align: middle;
}

.navbar-nav .dropdown-menu {
    background-color: #1E7B4B;
    border: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    border-radius: 6px;
}

.navbar-nav .dropdown:hover .dropdown-menu,
.navbar-nav .dropdown:focus-within .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.navbar-nav .dropdown-menu .dropdown-item {
    color: #fff;
    transition: background 0.3s;
}

.navbar-nav .dropdown-menu .dropdown-item:hover {
    background-color: #14532D;
    border-radius: 5px;
}

.navbar-nav .dropdown-menu.shadow-lg {
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.navbar .btn:hover {
    transform: translateY(-2px);
    transition: all 0.2s;
}
.navbar-nav .dropdown-menu .dropdown-item.active {
    background-color: #156B3B;
    color: #fff;
}

.navbar-nav .dropdown-menu .dropdown-item.active:hover {
    background-color: #198754;
    color: #fff;
}

.navbar-nav > li.active > .nav-link {
    background-color: #156B3B;
    color: #fff;
}

.navbar-nav > li.dropdown.active > .nav-link {
    background-color: #156B3B;
    color: #fff;
}

.navbar-nav .dropdown-menu li.active {
    width: 100%;
    background-color: #156B3B;
}

.navbar-nav .dropdown-menu li.active:hover {
    background-color: #198754;
}

.navbar-nav .dropdown-menu li:hover {
    background-color: #19875433;
}

.navbar-nav .dropdown-menu li a.dropdown-item {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0.5rem 1rem;
}

@media (max-width: 991.98px) {
    .navbar-nav {
        text-align: center;
    }

    .navbar-nav .nav-link {
        padding: 0.5rem 0.5rem;
        justify-content: center;
    }

    .navbar-nav .dropdown-menu {
        position: static !important;
        transform: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        background-color: #198754;
        margin-top: 0.5rem;
    }

    .navbar-nav .dropdown-menu .dropdown-item {
        color: #fff;
        text-align: center;
    }

    .navbar-nav .dropdown .caret {
        display: none;
    }
}

@media (max-width: 575.98px) {
    .navbar-nav .nav-link {
        padding: 0.4rem 0;
        font-size: 0.9rem;
    }

    .navbar-nav .dropdown-menu .dropdown-item {
        padding: 0.5rem 1rem;
    }

    .navbar-nav .dropdown-menu {
        border-radius: 0;
    }
}

.navbar-brand {
    background-color: #fff;
}

.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loader-spinner {
    width: 3rem;
    height: 3rem;
    border: 4px solid #e0e0e0;
    border-top: 4px solid #198754;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.scroll-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background-color: #198754;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s, background 0.3s, transform 0.3s;
}

.scroll-top-btn.show {
    opacity: 1;
}

.scroll-top-btn:hover {
    background-color: #156B3B;
    transform: translateY(-3px);
}

.hero__search {
    background-color: #e6f2ea; padding: 30px 0;
}

.product-search-input {
    background-color: #f0fdf4;
}

.sound-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(6px);
    color: #fff;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sound-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

.sound-btn i {
    pointer-events: none;
}

.hero-carousel-inner {
    height: 500px;
}

.hero-carousel-img {
    height: 500px;
    object-fit: cover;
}

.hero-caption {
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.4);
    padding: 30px;
    border-radius: 12px;
    max-width: 60%;
}

.hero-control-icon {
    background-color: rgba(0,0,0,0.7);
    border-radius: 50%;
    padding: 1rem;
}

.product-img {
    height: 200px;
    object-fit: cover;
}

.product-body {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 450px;
    border: 1px solid #e6e6e6;
    border-radius: 8px;
    overflow: hidden;
}

.product-thumb {
    width: 100%;
    height: 220px;
    object-fit: contain;
    background-color: #f8f9fa;
    display: block;
    margin: 10px 0;
}

.product-card-body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    text-align: center;
    padding: 15px;
}

.product-card-body h6 {
    font-size: 1rem;
    margin-bottom: 10px;
}

.product-card-body p {
    font-weight: bold;
    color: #198754;
    margin-bottom: 15px;
}

.product-card-body .btn {
    margin-top: auto;
}

.product-card .badge {
    z-index: 1;
}

.btn-view {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.control-icon {
    background-color: rgba(0,0,0,0.7);
    border-radius: 50%;
    padding: 1rem;
}

.pagination .page-link {
    color: #156B3B;
    border: 1px solid #198754;
    background-color: #ffffff;
}

.pagination .page-link:hover {
    background-color: #198754;
    color: #ffffff;
}

.pagination .page-item.active .page-link {
    background-color: #198754;
    border-color: #198754;
    color: #ffffff;
}

.pagination .page-item.disabled .page-link {
    color: #6c757d;
    pointer-events: none;
    background-color: #ffffff;
    border-color: #dee2e6;
}

.text-hover-success {
    transition: color 0.3s ease;
}

.text-hover-success:hover {
    color: #198754 !important;
}

.password-toggle {
    position: relative;
}

.password-toggle input.form-control {
    padding-right: 2.5rem;
}

.password-toggle .toggle-password {
    position: absolute;
    top: 50%;
    right: 5px;
    transform: translateY(-50%);
    cursor: pointer;
    color: #495057;
    font-size: 1rem;
    background-color: #f8f9fa;
    padding: 4px 6px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.password-toggle .error {
    display: block;
    font-size: 0.875rem;
    color: #dc3545;
    position: absolute;
    bottom: -1.25rem;
    left: 0;
}

.profile-card {
    width: fit-content;
    margin: 0 auto;
}


.profile-image-wrapper {
    position: relative;
    display: inline-block;
    width: 150px;
    height: 150px;
}

.profile-image-container {
    position: relative;
    width: 100%;
    height: 100%;
    border: 2px solid #28a745;
    border-radius: 50%;
    overflow: hidden;
}

.profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.profile-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #fff;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    cursor: pointer;
    transition: opacity 0.3s;
}

.profile-image-container:hover .profile-image-overlay {
    opacity: 1;
}

#proof_preview{
    max-width:160px;
}

.online-indicator {
    position: absolute;
    width: 18px;
    height: 18px;
    bottom: 8px;
    right: 22px;
    border: 2px solid #fff;
    border-radius: 50%;
    background-color: #28a745;
    z-index: 2;
}

.sidebar-separator {
    height: 1px;
    background: linear-gradient(to right, transparent, #28a745, transparent);
    margin: 10px 0 15px 0;
    opacity: 0.6;
}

.user-dashboard-menu .nav-link {
    font-size: 0.875rem;
    padding: 0.5rem 12px !important;
    color: #333;
    border-radius: 8px;
    transition: 0.3s;
    margin-bottom: 5px;
    border-radius: 0 !important;
}

.user-dashboard-menu .nav-link:hover,
.user-dashboard-menu .nav-link.active {
    background: #198754;
    color: #fff;
    border-radius: 0 !important;
}

.sidebar-collapsible {
    width: 260px;
    transition: width 0.3s ease;
}

.sidebar-collapsible.collapsed {
    width: 60px;
}

#sidebar.collapsed .profile-image-wrapper {
    display: none !important;
}

#sidebar.collapsed .sidebar-label {
    display: none !important;
}

#sidebar.collapsed .nav-link {
    justify-content: center;
}

.main-content-wrapper {
    transition: margin-left 0.3s ease;
}

.nav-link i {
    min-width: 20px;
    text-align: center;
}

#memberLogout:hover {
    color: #fff !important;
}

.tree-container {
    flex: 1;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
}

.tree {
    display: table;
    margin: 0 auto;
}

.tree ul {
    padding-top: 20px;
    position: relative;
}

.tree li {
    float: left;
    text-align: center;
    list-style-type: none;
    position: relative;
    padding: 20px 10px 0 10px;
}

.tree li::before,
.tree li::after {
    content: '';
    position: absolute;
    top: 0;
    right: 50%;
    border-top: 2px solid #ccc;
    width: 50%;
    height: 20px;
}

.tree li::after {
    right: auto;
    left: 50%;
    border-left: 2px solid #ccc;
}

.tree li:only-child::before,
.tree li:only-child::after {
    display: none;
}

.tree li:only-child {
    padding-top: 0;
}

.tree li:first-child::before,
.tree li:last-child::after {
    border: 0 none;
}

.tree li:last-child::before {
    border-right: 2px solid #ccc;
}

.tree ul ul::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    border-left: 2px solid #ccc;
    width: 0;
    height: 20px;
}

.tree .node {
    display: inline-block;
    padding: 8px 14px;
    background: #198754;
    color: #fff;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    transition: 0.3s;
    min-width: 70px;
}

.tree .node:hover {
    background: #14532D;
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .tree li {
        padding: 15px 5px 0 5px;
    }

    .tree .node {
        font-size: 11px;
        padding: 6px 10px;
    }
}

.tree ul {
    padding-top: 20px; position: relative;
    transition: all 0.5s;
    display: flex;
    justify-content: center;
}

.tree li {
    float: left; text-align: center;
    list-style-type: none;
    position: relative;
    padding: 20px 5px 0 5px;
    transition: all 0.5s;
}

.tree li::before, .tree li::after{
    content: '';
    position: absolute; top: 0; right: 50%;
    border-top: 2px solid #28a745;
    width: 50%; height: 20px;
}
.tree li::after{
    right: auto; left: 50%;
    border-left: 2px solid #28a745;
}

.tree li:only-child::after, .tree li:only-child::before { display: none; }
.tree li:only-child{ padding-top: 0; }
.tree li:first-child::before, .tree li:last-child::after{ border: 0 none; }
.tree li:last-child::before{ border-right: 2px solid #28a745; border-radius: 0 5px 0 0; }
.tree li:first-child::after{ border-radius: 5px 0 0 0; }

.tree ul ul::before{
    content: '';
    position: absolute; top: 0; left: 50%;
    border-left: 2px solid #28a745;
    width: 0; height: 20px;
}

.tree-node {
    border: 2px solid #28a745;
    padding: 10px;
    text-decoration: none;
    color: #333;
    font-size: 12px;
    display: inline-block;
    border-radius: 8px;
    background: white;
    min-width: 80px;
    transition: 0.3s;
}

.tree-node img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: block;
    margin: 0 auto 5px;
}

.tree-node:hover {
    background: #28a745;
    color: white;
}

.tree-node-empty {
    border: 2px dashed #ccc;
    padding: 15px;
    color: #999;
    text-decoration: none;
    border-radius: 8px;
    font-size: 11px;
}

/* Fixed Tree Styles */
/* .fixed-tree-modal {
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
}

.fixed-tree-dialog {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
}

.fixed-tree-content {
    height: 100vh;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.fixed-tree-body {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    padding: 0;
}

.fixed-tree-container {
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: block;
}

#treeRoot {
    width: 100%;
    height: 100%;
}

svg {
    width: 100%;
    height: 100%;
    display: block;
}

.node rect {
    fill: #fff;
    stroke: #28a745;
    stroke-width: 2px;
    rx: 10;
    ry: 10;
}

.node.inactive rect {
    fill: #f1f3f5;
    stroke: #ced4da;
}

.node text {
    font-family: Arial, sans-serif;
    font-size: 11px;
    fill: #333;
    text-anchor: middle;
    pointer-events: none;
}

.node.inactive text {
    fill: #adb5bd;
}

.node:hover rect {
    fill: #28a745;
}

.node:hover text {
    fill: #fff;
}

.node.active rect {
    fill: orange !important;
    stroke: #ff7a00 !important;
}

.link {
    fill: none;
    stroke: #28a745;
    stroke-width: 1.2px;
    opacity: 0.85;
}

svg image {
    pointer-events: none;
}

@media (max-width: 768px) {

    .node text {
        font-size: 9px;
    }
} */


.fixed-tree-modal {
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
}

.fixed-tree-dialog {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
}

.fixed-tree-content {
    height: 100vh;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.fixed-tree-body {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    padding: 0;
}

.fixed-tree-container {
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: block;
}

#treeRoot {
    width: 100%;
    height: 100%;
}

svg {
    width: 100%;
    height: 100%;
    display: block;
}

.node rect {
    fill: #fff;
    stroke: #28a745;
    stroke-width: 2px;
    rx: 8;
    ry: 8;
}

.node .member-name {
    font-size: 14px;
    font-weight: bold;
    fill: #212529;
}

.node .member-info {
    font-size: 11px;
    fill: #6c757d;
}

.node.inactive rect {
    fill: #f8f9fa;
    stroke: #dee2e6;
}

.node text {
    font-family: Arial, sans-serif;
    text-anchor: middle;
    pointer-events: none;
}

.node.inactive text {
    fill: #adb5bd;
}

.node:hover rect {
    fill: #f8fff9;
    stroke: #218838;
}

.node.active rect {
    fill: orange !important;
    stroke: #ff7a00 !important;
}

.link {
    fill: none;
    stroke: #ced4da;
    stroke-width: 1.5px;
}

svg image {
    pointer-events: none;
}

@media (max-width: 768px) {
    .node .member-name { font-size: 11px; }
    .node .member-info { font-size: 9px; }
}