/* CSS Design System - ECOPASSOS */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
    /* Colors - Vibrant, elegant, no neon */
    --primary: #10B981; /* Emerald */
    --primary-dark: #047857;
    --primary-light: #D1FAE5;
    
    --secondary: #3B82F6; /* Blue */
    --secondary-dark: #1D4ED8;
    
    --accent: #F59E0B; /* Amber */
    --accent-dark: #B45309;

    --bg-main: #F3F4F6;
    --bg-card: #FFFFFF;
    
    --text-main: #1F2937;
    --text-muted: #6B7280;
    
    --border: #E5E7EB;
    
    --danger: #EF4444;
    --success: #10B981;
    --warning: #F59E0B;
    --info: #3B82F6;

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-full: 9999px;

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-main);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-secondary { color: var(--secondary); }
.text-muted { color: var(--text-muted); }
.font-bold { font-weight: 700; }
.font-medium { font-weight: 500; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-body);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 6px rgba(16, 185, 129, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(16, 185, 129, 0.3);
    color: white;
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
    color: white;
    box-shadow: 0 4px 6px rgba(59, 130, 246, 0.25);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(59, 130, 246, 0.3);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

/* Cards */
.card {
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 1.5rem;
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.02);
}

.card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-3px);
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-main);
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: #F9FAFB;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background-color: #FFFFFF;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Auth Layout */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #10B981 0%, #047857 100%);
    padding: 1rem;
}

.auth-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    padding: 3rem 2rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    text-align: center;
}

.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 2rem;
    font-family: var(--font-heading);
    font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: 2rem;
}

/* Admin Layout */
.admin-layout {
    display: flex;
    min-height: 100vh;
    background-color: var(--bg-main);
}

.sidebar {
    width: 280px;
    background-color: var(--bg-card);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 40;
    transition: transform 0.3s ease;
}

.sidebar-header {
    height: 70px;
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    border-bottom: 1px solid var(--border);
}

.sidebar-logo {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    color: var(--text-muted);
    border-radius: var(--radius-md);
    font-weight: 500;
    transition: var(--transition);
}

.nav-item:hover, .nav-item.active {
    background-color: var(--primary-light);
    color: var(--primary-dark);
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border);
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
}

.main-content {
    flex: 1;
    margin-left: 280px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: calc(100% - 280px);
}

.topbar {
    height: 70px;
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 30;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background-color: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.content-wrapper {
    padding: 2rem;
    flex: 1;
}

/* Dashboard Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
}

.icon-emerald { background-color: var(--primary-light); color: var(--primary-dark); }
.icon-blue { background-color: #DBEAFE; color: var(--secondary-dark); }
.icon-amber { background-color: #FEF3C7; color: var(--accent-dark); }
.icon-purple { background-color: #EDE9FE; color: #6D28D9; }

.stat-info h3 {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.stat-info p {
    font-size: 1.5rem;
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-main);
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.chart-container {
    height: 300px;
    position: relative;
    width: 100%;
}

/* Alert / Toast */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards, fadeOut 0.5s 4.5s forwards;
}

@keyframes slideIn {
    0% { transform: translateX(100%); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}

@keyframes fadeOut {
    0% { transform: translateX(0); opacity: 1; }
    100% { transform: translateX(100%); opacity: 0; }
}

.alert-danger {
    background-color: #FEE2E2;
    color: #B91C1C;
    border: 1px solid #F87171;
}

.alert-success {
    background-color: #D1FAE5;
    color: #047857;
    border: 1px solid #34D399;
}

/* Responsive Admin */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-main);
    cursor: pointer;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    z-index: 35;
    backdrop-filter: blur(4px);
}

@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
        width: 100%;
    }
    .mobile-toggle {
        display: block;
    }
    .sidebar-overlay.open {
        display: block;
    }
}

/* Landing Page Styles */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    background: linear-gradient(rgba(4, 120, 87, 0.9), rgba(16, 185, 129, 0.8)), url('https://images.unsplash.com/photo-1500382017468-9049fed747ef?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80') center/cover;
    color: white;
    text-align: center;
    padding: 6rem 0;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    color: white;
    text-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.hero p {
    font-size: 1.25rem;
    max-width: 800px;
    margin: 0 auto 2.5rem;
    opacity: 0.9;
}

.site-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 0;
    z-index: 50;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 2rem;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.site-nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.site-nav a {
    color: white;
    font-weight: 500;
    font-size: 1.1rem;
}

.site-nav a:hover {
    color: var(--accent);
}

.section {
    padding: 5rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--primary-dark);
    margin-bottom: 1rem;
}

.section-title p {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    text-align: center;
    padding: 2.5rem 2rem;
}

.feature-icon {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-full);
    background-color: var(--primary-light);
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 1.5rem;
}

.site-footer {
    background-color: #111827;
    color: white;
    padding: 4rem 0 2rem;
}

.footer-bottom {
    border-top: 1px solid #374151;
    margin-top: 3rem;
    padding-top: 2rem;
    text-align: center;
    color: #9CA3AF;
    font-size: 0.9rem;
}
