:root {
    --primary-green: #2ecc71;
    --dark-green: #27ae60;
    --light-green: #58e68a;
    --progress-green: #1abc9c;
    --text-dark: #2c3e50;
    --text-light: #ecf0f1;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f9f9f9;
    /* Ensure no default spacing */
    margin: 0;
    padding: 0;
}

.mobile-menu-header {
    display: none; /* Hidden on desktop */
}

/* Progress Bar */
.progress-container {
    width: 100%;
    height: 1px;
    background:transparent;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
}

.progress-bar {
    height: 100%;
    background:#FBAE00;
    width: 0%;
    transition: width 0.3s ease;
}

/* Navbar — .tasksfy-navbar beats Bootstrap .navbar collisions */
.navbar.tasksfy-navbar {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 12px clamp(12px, 2.5vw, 32px);
    background-color: #05A243 !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;
    min-height: 84px;
    height: auto;
    overflow: visible;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.navbar.tasksfy-navbar.scrolled {
    background-color: #05A243 !important;
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.16);
    top: 0;
}

.navbar.tasksfy-navbar.hide-on-scroll-up {
    transform: translateY(-100%);
}

body {
    padding-top: 84px;
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
    flex: 1 1 auto;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-left: auto;
    flex-shrink: 0;
}

.logo-container {
    display: flex;
    align-items: center;
    min-width: 0;
}

.navbar-brand-link {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    text-decoration: none;
    color: inherit;
    min-width: 0;
    padding: 0;
    margin: 0;
}

.navbar-logo {
    height: 46px;
    width: 46px;
    object-fit: contain;
    flex-shrink: 0;
    display: block;
}

.logo-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 2px;
    min-width: 0;
}

.brand-name {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
    padding: 0;
    line-height: 1.15;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.navbar-subtitle {
    display: block;
    font-size: 0.7rem;
    font-weight: 500;
    color: #fff;
    margin: 0;
    padding: 0;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: min(340px, 42vw);
}

.navbar-subtitle em {
    font-style: normal;
    color: #FBAE00;
    font-weight: 700;
}

.navbar-tagline {
    font-size: 0.9rem;
    color: #ffffff;
}

.navbar-links {
    display: flex;
    align-items: center;
    gap: 1.35rem;
    margin: 0;
}

.nav-link {
    text-decoration: none;
    color: #fff;
    font-weight: 500;
    font-size: 1rem;
    transition: color 0.25s ease, opacity 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
    white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
    color: #FBAE00;
}

.nav-link.help-button {
    background-color: #FBAE00;
    color: #fff;
    padding: 0.55rem 1.15rem;
    border-radius: 6px;
    font-weight: 600;
    transition: background-color 0.25s ease, color 0.25s ease, transform 0.2s ease;
    margin-left: 0.35rem;
}

.nav-link.help-button:hover {
    background-color: #fff;
    color: #05A243;
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-shrink: 0;
}

.nav-icon-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: #fff;
    font-size: 1.25rem;
    cursor: pointer;
    text-decoration: none;
    border-radius: 999px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.nav-icon-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    text-decoration: none;
}

.nav-icon-badge {
    position: absolute;
    top: 8px;
    right: 9px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #ef4444;
    border: 2px solid #05A243;
}

.nav-profile {
    display: inline-flex;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
    padding: 0;
    background: transparent;
    cursor: pointer;
}

.nav-profile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.offcanvas-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-weight: 700;
    font-size: 1.15rem;
}

/* Dropdown */
.dropdown {
    position: relative;
    display: flex;
    align-items: center;
}

.dropdown .nav-link {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.dropdown .nav-link i {
    transition: transform 0.4s ease;
}

.dropdown:hover .nav-link i {
    transform: rotate(180deg);
}

.dropdown-content {
    position: absolute;
    background-color: white;
    min-width: 160px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    border-radius: 4px;
    z-index: 1;
    top: 100%;
    left: 0;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.dropdown-content a {
    color: var(--text-dark);
    padding: 0.8rem 1rem;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
}

.dropdown-content a:hover {
    background-color: #f5f5f5;
    color:#FBAE00;
}

.dropdown:hover .dropdown-content {
    opacity: 1;
    visibility: visible;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-dark);
    cursor: pointer;
    padding: 0.5rem;
    z-index: 999;
}

@media (max-width: 1100px) {
    .navbar-subtitle {
        max-width: min(260px, 36vw);
    }

    .navbar-links {
        gap: 1rem;
    }
}

@media (max-width: 992px) {
    .navbar.tasksfy-navbar {
        min-height: 72px;
        padding: 10px 14px;
    }

    body {
        padding-top: 72px;
    }

    .navbar-logo {
        height: 40px;
        width: 40px;
    }
    
    .brand-name {
        font-size: 1.3rem;
        line-height: 1.15;
    }
    
    .navbar-subtitle {
        font-size: 0.62rem;
        max-width: min(220px, 40vw);
        white-space: nowrap;
    }
    
    .navbar-tagline {
        display: none;
    }

    .navbar-links {
        position: fixed;
        top: 0;
        left: 0;
        width: min(300px, 86vw);
        height: 100vh;
        background-color: #05A243;
        flex-direction: column;
        align-items: flex-start;
        padding: 0;
        box-shadow: 2px 0 15px rgba(0,0,0,0.5);
        gap: 0;
        margin: 0;
        display: flex;
        overflow-y: auto;
        z-index: 1005;
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
    }

    .mobile-menu-toggle {
        display: block;
        color: #fff;
        margin-right: 0;
    }

    .mobile-menu-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        padding: 15px 20px;
        background-color: #05A243;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        margin-bottom: 10px;
    }
    
    .offcanvas-logo {
        height: 36px;
        width: auto;
        object-fit: contain;
    }
    
    .offcanvas-close {
        background: none;
        border: none;
        color: white;
        font-size: 1.5rem;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        padding: 5px;
    }
    
    .offcanvas-close:hover,
    .offcanvas-close:focus {
        color: #FBAE00;
    }

    .navbar-links.active {
        transform: translateX(0);
        padding: 1rem 0;
    }

    .dropdown {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .nav-link {
        padding: 1rem 2rem;
        width: 100%;
        text-align: left;
        justify-content: flex-start;
        white-space: nowrap;
    }
    
    .nav-link.help-button {
        width: calc(100% - 4rem);
        margin: 1rem 2rem;
        text-align: center;
        justify-content: center;
    }

    .dropdown-content {
        position: static;
        box-shadow: none;
        width: 100%;
        background-color: rgba(0, 0, 0, 0.15);
        margin-top: 0;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        visibility: hidden;
        transition: max-height 0.4s ease-out, opacity 0.3s ease-in-out;
    }
    
    .dropdown-content a {
        color: rgba(255, 255, 255, 0.9);
        padding: 0.8rem 1rem 0.8rem 3rem;
        text-align: left;
        border-left: 3px solid transparent;
        transition: all 0.3s ease;
    }
    
    .dropdown-content a:hover, 
    .dropdown-content a:active {
        background-color: rgba(255, 255, 255, 0.1);
        color: #FBAE00;
        border-left-color: #FBAE00;
    }
    
    .dropdown:hover .dropdown-content {
        max-height: 0;
        opacity: 0;
        visibility: hidden;
    }
    
    .dropdown.active .dropdown-content {
        max-height: 300px;
        opacity: 1;
        visibility: visible;
    }

    .dropdown .nav-link i {
        font-size: 1.2rem;
        padding: 10px 5px;
        margin-left: 5px;
        color: rgba(255, 255, 255, 0.9);
        transition: transform 0.4s ease, color 0.3s ease;
    }
    
    .dropdown:hover .nav-link i {
        color: #FBAE00;
        transform: none;
    }

    .dropdown.active .nav-link i {
        transform: rotate(180deg);
        color: #FBAE00;
    }

    .navbar-actions {
        gap: 0.45rem;
    }

    .nav-icon-btn {
        width: 36px;
        height: 36px;
        font-size: 1.15rem;
    }

    .nav-profile {
        width: 34px;
        height: 34px;
    }
}

@media (max-width: 768px) {
    .navbar.tasksfy-navbar {
        flex-direction: row;
        flex-wrap: nowrap;
        min-height: 70px;
        padding: 10px 12px;
        background-color: #05A243 !important;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
        top: 0 !important;
    }
    
    body {
        padding-top: 70px;
    }
    
    .navbar-logo {
        height: 38px;
        width: 38px;
    }
    
    .brand-name {
        font-size: 1.25rem;
        line-height: 1.15;
    }
    
    .navbar-subtitle {
        display: none;
    }
    
    .logo-container {
        align-items: center;
    }

    .navbar-right {
        gap: 0.65rem;
    }

    .navbar-actions .nav-icon-btn:first-child {
        display: none;
    }
}

@media (max-width: 576px) {
    .navbar.tasksfy-navbar {
        padding: 10px 12px;
        min-height: 64px;
    }

    body {
        padding-top: 64px;
    }
    
    .navbar-logo {
        height: 34px;
        width: 34px;
    }
    
    .brand-name {
        font-size: 1.2rem;
        line-height: 1.15;
    }

    .navbar-actions .nav-icon-btn {
        display: none;
    }
}