* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4CAF50;
    --primary-light: #81C784;
    --primary-dark: #388E3C;
    --accent-color: #8BC34A;
    --text-dark: #333;
    --text-light: #666;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #E8F5E9 0%, #C8E6C9 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-dark);
}

.logo i {
    color: var(--primary-color);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info span {
    font-weight: 500;
}

.auth-buttons {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 8px 16px;
    border-radius: 5px;
    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-danger {
    background: #ff4757;
    color: var(--white);
}

.btn-danger:hover {
    background: #ff3742;
}

.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
    flex: 1;
}

/* Login Overlay Styles */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.login-container {
    background: var(--white);
    padding: 2rem;
    border-radius: 15px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.error-message {
    color: #e74c3c;
    text-align: center;
    margin-bottom: 1rem;
    padding: 10px;
    background: #ffeaea;
    border-radius: 5px;
}

/* Dashboard Styles */
.dashboard {
    display: none;
}

.welcome-section {
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    text-align: center;
    box-shadow: var(--shadow);
}

.welcome-section h1 {
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.welcome-section p {
    color: var(--text-light);
    font-size: 1.1rem;
}

.accounting-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.section-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.section-card h3 {
    color: var(--text-dark);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-card h3 i {
    color: var(--primary-color);
}

.feature-list {
    list-style: none;
}

.feature-list li {
    padding: 0.8rem 0;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background-color 0.3s;
}

.feature-list li:hover {
    background-color: #003151 20%, #f1f8e9 100%;
    border-radius: 5px;
    padding-left: 10px;
}

.feature-list li:last-child {
    border-bottom: none;
}

.feature-list a {
    text-decoration: none;
    color: var(--text-light);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.feature-list a:hover {
    color: var(--primary-color);
}

.feature-list i {
    width: 20px;
    text-align: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card i {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.stat-card.income i { color: #4cd137; }
.stat-card.journal i { color: #3498db; }
.stat-card.invoice i { color: #9b59b6; }
.stat-card.balance i { color: var(--primary-dark); }

.stat-number {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Public View (when not logged in) */
.public-view {
    display: block;
    text-align: center;
    color: var(--text-dark);
    padding: 4rem 2rem;
}

.public-view h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--primary-dark);
}

.public-view p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: var(--text-light);
}

.feature-preview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.preview-card {
    background: rgba(255, 255, 255, 0.9);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.preview-card i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.preview-card h3 {
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.preview-card ul {
    list-style: none;
    text-align: left;
}

.preview-card li {
    padding: 0.5rem 0;
    color: var(--text-light);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.preview-card li:last-child {
    border-bottom: none;
}

/* Footer Styles */
.footer {
    background: var(--white);
    padding: 2rem 0;
    margin-top: auto;
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.05);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-section h3 {
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.footer-section p, .footer-section a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--primary-color);
}

.footer-section .social-links {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.footer-section .social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--bg-light);
    border-radius: 50%;
    transition: all 0.3s;
}

.footer-section .social-links a:hover {
    background: var(--primary-color);
    color: var(--white);
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 2rem 0;
    border-top: 1px solid #eee;
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .nav {
        flex-direction: column;
        gap: 1rem;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .accounting-grid,
    .stats-grid,
    .feature-preview,
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .public-view h1 {
        font-size: 2rem;
    }
    
    .footer-section {
        text-align: center;
    }
    
    .footer-section .social-links {
        justify-content: center;
    }
}