/* css/style.css - Green Theme for Accounting System */

:root {
    --primary-color: #2e7d32;
    --primary-light: #4caf50;
    --primary-dark: #1b5e20;
    --secondary-color: #ff8f00;
    --text-dark: #263238;
    --text-light: #546e7a;
    --background-light: #f5f5f5;
    --white: #ffffff;
    --shadow: 0 2px 4px rgba(0,0,0,0.1);
    --border-radius: 4px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--background-light);
}

/* Landing Page Styles */
.landing-page {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
}

/* Header/Navigation */
.main-header {
    background: rgba(255,255,255,0.95);
    box-shadow: var(--shadow);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.logo h1 {
    color: var(--primary-dark);
    font-size: 1.5rem;
}

.logo span {
    color: var(--primary-light);
    font-weight: bold;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.main-nav a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s;
}

.main-nav a:hover {
    color: var(--primary-color);
}

.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-outline {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* Hero Section */
.hero {
    padding: 120px 0 60px;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    color: var(--white);
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.hero-buttons .btn {
    padding: 0.8rem 2rem;
    font-size: 1.1rem;
}

/* Features Section */
.features {
    padding: 80px 0;
    background: var(--white);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: var(--primary-dark);
    margin-bottom: 3rem;
}

.features-grid {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    color: var(--primary-dark);
    margin-bottom: 1rem;
}

/* Login/Register Forms */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    padding: 2rem;
}

.auth-box {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h2 {
    color: var(--primary-dark);
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: var(--text-light);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
}

.alert {
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Dashboard Layout */
.dashboard {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background: var(--primary-dark);
    color: var(--white);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding: 1.5rem;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-menu {
    padding: 1rem 0;
}

.sidebar-menu ul {
    list-style: none;
}

.sidebar-menu li {
    margin-bottom: 0.5rem;
}

.sidebar-menu a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: all 0.3s;
}

.sidebar-menu a:hover {
    background: rgba(255,255,255,0.1);
    color: var(--white);
}

.sidebar-menu .active a {
    background: var(--primary-color);
    color: var(--white);
}

.main-content {
    flex: 1;
    margin-left: 250px;
    padding: 2rem;
}

.top-bar {
    background: var(--white);
    padding: 1rem 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.stat-title {
    color: var(--text-light);
    font-size: 0.9rem;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-dark);
}

/* Tables */
.data-table {
    width: 100%;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    border-collapse: collapse;
}

.data-table th {
    background: var(--primary-dark);
    color: var(--white);
    padding: 1rem;
    text-align: left;
    font-weight: 500;
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid #eee;
}

.data-table tr:hover {
    background: #f9f9f9;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-buttons {
        justify-content: center;
    }

    .sidebar {
        width: 0;
        display: none;
    }

    .main-content {
        margin-left: 0;
    }

    .main-nav ul {
        display: none;
    }
}

/* Footer */
.main-footer {
    background: var(--primary-dark);
    color: var(--white);
    padding: 3rem 0 1rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* Dashboard Enhancements */
.welcome-banner {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    color: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
}

.welcome-banner select {
    background: rgba(255,255,255,0.2);
    color: white;
    border: none;
    padding: 0.5rem;
    border-radius: var(--border-radius);
}

.welcome-banner select option {
    background: var(--primary-dark);
    color: white;
}

.stat-card {
    position: relative;
    overflow: hidden;
}

.stat-card .trend-indicator {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 0.85rem;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* Status colors */
.status-approved {
    background: var(--primary-color);
    color: white;
}

.status-pending {
    background: var(--secondary-color);
    color: white;
}

.status-rejected {
    background: #dc3545;
    color: white;
}

/* Transaction type badges */
.type-sales {
    background: var(--primary-color);
    color: white;
}

.type-purchase {
    background: #2196f3;
    color: white;
}

.type-payment {
    background: #4caf50;
    color: white;
}

/* Quick action hover effect */
.quick-action:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    [style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
    
    .welcome-banner [style*="display: flex"] {
        flex-direction: column;
        gap: 1rem;
    }
    
    .welcome-banner select {
        width: 100%;
    }
}

/* Table enhancements */
.data-table td .action-buttons {
    display: flex;
    gap: 0.5rem;
}

.data-table td .btn-icon {
    padding: 0.25rem 0.5rem;
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
}

.data-table td .btn-icon:hover {
    color: var(--primary-color);
}

/* Amount colors */
.amount-positive {
    color: var(--primary-color);
    font-weight: bold;
}

.amount-negative {
    color: #dc3545;
    font-weight: bold;
}

/* Chart container */
.chart-container {
    position: relative;
    height: 250px;
    width: 100%;
}

/* Loading state */
.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.loading:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Navigation styles with toggle functionality */
/* ===== Navigation Styles ===== */
/* ===== Navigation Styles with Class-Based Indentation ===== */
.sidebar-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu li {
    position: relative;
}

/* ===== Main Menu Items ===== */
.sidebar-menu > ul > li > a {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: all 0.3s;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    border-left: 3px solid transparent;
}

.sidebar-menu > ul > li > a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-left-color: var(--primary-light);
}

.sidebar-menu > ul > li.active > a {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border-left-color: var(--primary-color);
}

/* Main menu icons */
.sidebar-menu > ul > li > a i:first-child {
    width: 24px;
    font-size: 18px;
    margin-right: 12px;
    text-align: center;
}

/* Main menu text */
.sidebar-menu > ul > li > a .nav-text {
    flex: 1;
    font-size: 15px;
    font-weight: 600;
}

/* Arrow for main menu */
.sidebar-menu > ul > li > a .submenu-arrow {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    transition: transform 0.3s;
    margin-left: 10px;
}

.sidebar-menu > ul > li.expanded > a .submenu-arrow {
    transform: rotate(-90deg);
    color: white;
}

/* Badge for main menu */
.sidebar-menu > ul > li > a .badge {
    background: var(--secondary-color);
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
    min-width: 22px;
    text-align: center;
}

/* Divider between main menu items */
.sidebar-menu > ul > li:not(:last-child) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* ===== Submenu Container ===== */
.sidebar-menu .submenu {
    background: rgba(0, 0, 0, 0.25);
    padding: 5px 0;
    display: none;
}

/* ===== Indentation Classes Generated by PHP ===== */
.sidebar-menu .indent-level-1 a {
    padding-left: 44px !important;  /* Base indent for level 1 */
}

.sidebar-menu .indent-level-2 a {
    padding-left: 64px !important;  /* Deeper indent for level 2 */
}

.sidebar-menu .indent-level-3 a {
    padding-left: 84px !important;  /* Even deeper for level 3 */
}

.sidebar-menu .indent-level-4 a {
    padding-left: 104px !important; /* Deepest for level 4 */
}

/* ===== Submenu Items Base Style ===== */
.sidebar-menu .submenu li a {
    display: flex;
    align-items: center;
    padding: 10px 20px; /* Base padding, will be modified by indent classes */
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 13px;
    font-weight: 400;
    transition: all 0.3s;
    position: relative;
    min-height: 40px;
}

.sidebar-menu .submenu li a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.sidebar-menu .submenu li.active a {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    font-weight: 500;
    border-left: 2px solid var(--primary-color);
}

/* Submenu icons */
.sidebar-menu .submenu li a i:first-child {
    width: 18px;
    font-size: 13px;
    margin-right: 10px;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
}

.sidebar-menu .submenu li.active a i:first-child,
.sidebar-menu .submenu li a:hover i:first-child {
    color: white;
}

/* Submenu text */
.sidebar-menu .submenu li a .nav-text {
    font-size: 13px;
    font-weight: 400;
}

/* Submenu arrow for nested items */
.sidebar-menu .submenu li.has-submenu > a .submenu-arrow {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    transition: transform 0.3s;
    margin-left: auto;
}

.sidebar-menu .submenu li.has-submenu.expanded > a .submenu-arrow {
    transform: rotate(-90deg);
    color: rgba(255, 255, 255, 0.8);
}

/* ===== Nested Submenu Container ===== */
.sidebar-menu .submenu .submenu {
    background: rgba(0, 0, 0, 0.35);
}

.sidebar-menu .submenu .submenu .submenu {
    background: rgba(0, 0, 0, 0.45);
}

/* ===== Coming Soon Badge ===== */
.sidebar-menu .coming-soon {
    background: #ff9800;
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 9px;
    font-weight: 600;
    margin-left: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

/* ===== Favorite Star ===== */
.sidebar-menu .favorite-icon {
    color: #ffc107;
    font-size: 12px;
    margin-left: 6px;
    opacity: 0.4;
    cursor: pointer;
    transition: opacity 0.3s;
}

.sidebar-menu .favorite-icon:hover,
.sidebar-menu .favorite-icon.filled {
    opacity: 1;
}

/* ===== Favorites Header ===== */
.sidebar-menu .favorites-header {
    padding: 20px 20px 8px;
    color: rgba(255, 255, 255, 0.3);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 10px;
}

/* ===== Active State Indicators ===== */
.sidebar-menu .submenu li.active > a:before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--primary-color);
}