/* =========================================
   1. Mipangilio ya Msingi (Base Styles)
========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    color: #1f2937;
    background-color: #f9fcf9;
    overflow-x: hidden;
}

/* =========================================
   2. Header & Navbar (Landing Page)
========================================= */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    background: rgba(11, 58, 31, 0.95);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Hapa ndipo kwenye mabadiliko sahihi ya logo ya mlalo */
.logo {
    width: auto;         /* Upana unajipanga wenyewe kulingana na picha yako */
    height: 45px;        /* Inadhibiti urefu usipite kiwango cha navbar */
    max-height: 45px;
    object-fit: contain; /* Inazuia picha kujinyosha isivyo asili */
    border-radius: 0;    /* Inaondoa umbo la duara ili picha yote yionekane */
    border: none;        /* Inaondoa mipaka ya pembeni */
    background: transparent; /* Inaondoa background nyeupe */
    box-shadow: none;    /* Inaondoa kivuli */
    margin-bottom: 0;
}

.logo-section h2 {
    font-size: 18px;
    color: #fff;
    font-weight: 600;
    white-space: nowrap;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: #4ade80;
}

.nav-login {
    background: #22c55e;
    padding: 8px 16px;
    border-radius: 999px;
    color: #fff !important;
    font-weight: 600;
}

/* =========================================
   3. Hero Section & Background Image
========================================= */
.hero {
    position: relative;
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 20px;
    background: url('../images/hero-bg.jpg') no-repeat center center;
    background-size: cover;
    background-attachment: scroll;
    color: #fff;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(11, 58, 31, 0.85), rgba(20, 83, 45, 0.75));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 15px;
}

.hero-content h1 {
    font-size: clamp(26px, 5vw, 44px);
    margin-bottom: 15px;
    font-weight: 800;
    line-height: 1.2;
    color: #ffd369;
}

.hero-content p {
    font-size: clamp(14px, 2vw, 17px);
    margin-bottom: 25px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* =========================================
   4. Buttons Style
========================================= */
.btn {
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.btn:hover {
    transform: translateY(-2px);
}

.primary-btn {
    background: linear-gradient(135deg, #00c896, #009d73);
    color: white;
    box-shadow: 0 6px 18px rgba(0, 200, 150, 0.4);
}

.primary-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 200, 150, 0.55);
}

.secondary-btn {
    border: 2px solid #fff;
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(5px);
}

.secondary-btn:hover {
    background: #fff;
    color: #0d1b2a;
}

/* =========================================
   5. Sections (About, Features, CTA)
========================================= */
.about,
.features,
.cta {
    padding: 80px 6%;
}

.section-title {
    text-align: center;
    margin-bottom: 45px;
}

.section-title h2 {
    font-size: 32px;
    margin-bottom: 10px;
    color: #0b3a1f;
}

.section-title p {
    font-size: 16px;
    color: #6b7280;
}

/* About Boxes */
.about-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 25px;
}

.about-box {
    background: #ffffff;
    padding: 30px 20px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: transform 0.3s ease;
}

.about-box:hover {
    transform: translateY(-8px);
}

.about-box i {
    font-size: 38px;
    margin-bottom: 18px;
    color: #16a34a;
}

.about-box h3 {
    font-size: 20px;
    margin-bottom: 12px;
    color: #1f2937;
}

.about-box p {
    font-size: 15px;
    line-height: 1.6;
    color: #6b7280;
}

/* Feature Grid Cards */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 25px;
}

.feature-card {
    background: #ffffff;
    padding: 30px 20px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-8px);
}

.feature-card i {
    font-size: 38px;
    color: #16a34a;
    margin-bottom: 16px;
}

.feature-card h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #1f2937;
}

.feature-card p {
    font-size: 15px;
    line-height: 1.6;
    color: #6b7280;
}

/* CTA Section */
.cta {
    text-align: center;
    background: linear-gradient(135deg, #0b3a1f, #14532d);
    color: #fff;
    margin: 40px 5%;
    border-radius: 24px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

.cta h2 {
    font-size: 32px;
    margin-bottom: 15px;
    color: #ffd369;
}

.cta p {
    font-size: 16px;
    margin-bottom: 25px;
    color: rgba(255, 255, 255, 0.85);
}

/* =========================================
   6. Footer
========================================= */
.footer {
    text-align: center;
    padding: 25px;
    background: #f8fafc;
    font-size: 14px;
    color: #6b7280;
    border-top: 1px solid #e5e7eb;
}

/* =========================================
   7. Dashboard Topbar & Sidebar (Accountant)
========================================= */
.topbar {
    height: 60px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.topbar .left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.menu-btn {
    background: transparent;
    border: none;
    outline: none;
    font-size: 22px;
    color: #14532d;
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, color 0.2s ease;
}

.menu-btn:hover {
    color: #1f7a43;
    transform: scale(1.1);
}

/* Accountant Sidebar Styles */
.acc-sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 998;
    display: none;
}

.acc-sidebar-overlay.show {
    display: block;
}

.acc-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 270px;
    height: 100vh;
    background: linear-gradient(180deg, #0b3a1f 0%, #14532d 60%, #0e4124 100%);
    color: #fff;
    z-index: 999;
    overflow-y: auto;
    transition: all 0.3s ease;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}

.acc-sidebar.collapsed {
    width: 78px;
}

.acc-sidebar-header {
    padding: 20px 16px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}

.acc-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.acc-sidebar-brand img {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    background: #fff;
    border: 3px solid rgba(255, 255, 255, 0.16);
    flex-shrink: 0;
}

.acc-brand-text h2 {
    margin: 0;
    font-size: 16px;
    line-height: 1.2;
    color: #fff;
}

.acc-brand-text span {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.75);
}

.acc-nav-menu {
    list-style: none;
    margin: 0;
    padding: 14px 10px 20px;
}

.acc-nav-menu li {
    margin: 6px 0;
}

.acc-nav-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    color: #fff;
    text-decoration: none;
    border-radius: 14px;
    transition: all 0.25s ease;
    font-size: 15px;
    font-weight: 500;
}

.acc-nav-menu a:hover {
    background: rgba(255, 255, 255, 0.10);
}

.acc-nav-menu a.active {
    background: linear-gradient(90deg, rgba(34, 197, 94, 0.22), rgba(255, 255, 255, 0.08));
    border-left: 4px solid #4ade80;
    padding-left: 10px;
}

.acc-nav-icon {
    width: 24px;
    min-width: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.acc-nav-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.acc-dropdown-icon {
    margin-left: auto;
    font-size: 13px;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.acc-has-submenu.open > a .acc-dropdown-icon {
    transform: rotate(180deg);
}

.acc-submenu {
    list-style: none;
    display: none;
    margin: 6px 0 0;
    padding: 0 0 0 18px;
}

.acc-has-submenu.open .acc-submenu {
    display: block;
}

.acc-submenu li {
    margin: 6px 0;
}

.acc-submenu a {
    background: rgba(255, 255, 255, 0.05);
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 14px;
}

.acc-submenu a:hover {
    background: rgba(255, 255, 255, 0.12);
}

.acc-main {
    margin-left: 270px;
    min-height: 100vh;
    transition: all 0.3s ease;
}

.acc-main.expanded {
    margin-left: 78px;
}

.acc-topbar {
    position: sticky;
    top: 0;
    z-index: 997;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 14px 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.acc-sidebar.collapsed .acc-brand-text,
.acc-sidebar.collapsed .acc-nav-text,
.acc-sidebar.collapsed .acc-dropdown-icon,
.acc-sidebar.collapsed .acc-submenu {
    display: none !important;
}

.acc-sidebar.collapsed .acc-sidebar-brand {
    justify-content: center;
}

.acc-sidebar.collapsed .acc-nav-menu a {
    justify-content: center;
    padding-left: 14px;
    padding-right: 14px;
}

/* =========================================
   8. Alerts & Notifications
========================================= */
.alert {
    padding: 14px 18px;
    border-radius: 14px;
    margin-bottom: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    animation: fadeIn 0.3s ease;
}

.alert-success {
    background: #ecfdf3;
    color: #166534;
    border-left: 5px solid #22c55e;
}

.alert-error {
    background: #fef2f2;
    color: #b91c1c;
    border-left: 5px solid #ef4444;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =========================================
   9. Responsive Media Queries (Mobile Devices)
========================================= */
@media (max-width: 992px) {
    .navbar {
        flex-direction: column;
        gap: 12px;
        padding: 15px 20px;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }

    .hero-content h1 {
        font-size: 34px;
    }

    .about,
    .features,
    .cta {
        padding: 60px 20px;
    }

    .acc-sidebar {
        left: -100%;
        width: 270px !important;
    }

    .acc-sidebar.mobile-open {
        left: 0;
    }

    .acc-main,
    .acc-main.expanded {
        margin-left: 0;
    }

    .acc-sidebar.collapsed .acc-brand-text,
    .acc-sidebar.collapsed .acc-nav-text,
    .acc-sidebar.collapsed .acc-dropdown-icon {
        display: block !important;
    }
}

@media (max-width: 600px) {
    .hero {
        min-height: 75vh;
        padding: 30px 15px;
    }

    .hero-content h1 {
        font-size: 28px;
    }

    .hero-content p {
        font-size: 15px;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .section-title h2,
    .cta h2 {
        font-size: 26px;
    }

    .cta {
        margin: 20px 15px;
        padding: 40px 20px;
    }

    .logo-section h2 {
        font-size: 16px;
    }
}