:root {
    --primary-green: #4CAF50;
    --primary-blue: #2196F3;
    --primary-yellow: #FFC107;
    --secondary-green: #45a049;
    --secondary-blue: #1976D2;
    --secondary-yellow: #FFB300;
    --dark: #333;
    --light: #f5f5f5;
    --white: #ffffff;
    --gray: #666;
    --light-gray: #e0e0e0;
    --danger: #f44336;
    --success: #4CAF50;
    --warning: #FFC107;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--dark);
}

/* Login Page */
.login-page {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-card {
    background: var(--white);
    border-radius: 20px;
    padding: 40px 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.logo-container {
    text-align: center;
    margin-bottom: 30px;
}

.logo-img {
    width: 220px;
    /* aqui altera o tamanho da logo */
    height: auto;
    margin-bottom: 15px;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.1));
}

.logo-container h1 {
    color: var(--primary-green);
    font-size: 32px;
    margin-bottom: 5px;
}

.tagline {
    color: var(--gray);
    font-size: 14px;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--dark);
    font-weight: 500;
}

.input-group input,
.input-group select,
.input-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--light-gray);
    border-radius: 10px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-green), var(--primary-blue));
    color: var(--white);
    border: none;
    padding: 12px 30px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3);
}

.btn-primary.btn-block {
    width: 100%;
}

.btn-secondary {
    background: var(--primary-yellow);
    color: var(--dark);
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
}

.login-footer-outside {
    margin-top: 30px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    text-align: center;
}

/* App Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: var(--white);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 25px 20px;
    background: linear-gradient(135deg, var(--primary-green), var(--primary-blue));
    color: var(--white);
}

.logo-small {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: bold;
}

.sidebar-logo {
    width: 32px;
    height: auto;
    filter: brightness(0) invert(1);
    /* Makes it white if it's a dark logo, adjust as needed */
}

.nav-menu {
    flex: 1;
    list-style: none;
    padding: 20px 0;
}

.nav-item {
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: background 0.3s;
}

.nav-item:hover {
    background: var(--light);
}

.nav-item.active {
    background: linear-gradient(90deg, var(--primary-green), var(--primary-blue));
    color: var(--white);
}

.nav-icon {
    font-size: 20px;
}

.user-info {
    padding: 20px;
    border-top: 1px solid var(--light-gray);
    text-align: center;
}

.user-city {
    font-size: 12px;
    color: var(--gray);
    margin-top: 5px;
}

.main-content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    background: var(--light);
}

/* Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--white);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-title {
    color: var(--gray);
    font-size: 14px;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 36px;
    font-weight: bold;
    color: var(--primary-blue);
}

.stat-trend {
    margin-top: 10px;
    font-size: 12px;
    color: var(--success);
}

/* Tables */
.data-table {
    width: 100%;
    background: var(--white);
    border-radius: 10px;
    overflow-x: auto;
}

.data-table table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--light-gray);
}

.data-table th {
    background: linear-gradient(135deg, var(--primary-green), var(--primary-blue));
    color: var(--white);
    font-weight: 600;
}

.data-table tr:hover {
    background: var(--light);
}

/* Forms */
.form-container {
    background: var(--white);
    border-radius: 15px;
    padding: 30px;
    max-width: 800px;
    margin: 0 auto;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 30px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: var(--white);
    border-radius: 20px;
    padding: 30px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -260px;
        top: 0;
        bottom: 0;
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1001;
        height: 100vh;
    }

    .sidebar.open {
        left: 0;
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1000;
        backdrop-filter: blur(2px);
    }

    .sidebar-overlay.active {
        display: block;
    }

    .main-content {
        margin-left: 0;
        padding: 20px;
        padding-top: 80px;
        /* Space for mobile header */
    }

    .mobile-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 60px;
        background: var(--white);
        padding: 0 20px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        z-index: 900;
    }

    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        background: var(--light);
        border: none;
        border-radius: 8px;
        font-size: 24px;
        cursor: pointer;
        color: var(--primary-green);
    }

    .mobile-logo-img {
        height: 40px;
        width: auto;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .form-container {
        padding: 20px;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions button {
        width: 100%;
    }
}

@media (min-width: 769px) {
    .mobile-header {
        display: none;
    }

    .sidebar-overlay {
        display: none !important;
    }
}

/* Loading Spinner */
.spinner {
    border: 3px solid var(--light-gray);
    border-top: 3px solid var(--primary-blue);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* WhatsApp Styling */
.whatsapp-link {
    color: #25D366;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: transform 0.2s;
}

.whatsapp-link:hover {
    transform: scale(1.05);
}

.btn-whatsapp {
    background-color: #25D366;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 5px 8px;
    cursor: pointer;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
    text-decoration: none;
}

.btn-whatsapp:hover {
    background-color: #128C7E;
}