:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: url('../img/background.png') no-repeat center center fixed;
    background-size: cover;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}


.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px;
}

/* Navbar Responsiva */
.navbar {
    background-color: var(--dark-color);
    color: white;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 150px;
}

.navbar-brand {
    border-radius: 10px;
    width: 100px;
    height: 50px;
}

.nav-links {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    padding: 10px 10px;
    margin: 0;
}

.nav-links li {
    margin: 5px 0;
}

.nav-links a {
    color: white;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 4px;
    background: rgba(255,255,255,0.1);
    font-size: 0.9rem;
}

.nav-links a:hover {
    background: rgba(255,255,255,0.2);
}

.login{
    text-align: center;
}

/* Login Page Responsiva */
.login-container {
    width: 95%;
    max-width: 400px;
    margin: 50px auto;
    background: #e3e5e5;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px; /* Evita zoom automático no iOS */
}

.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: opacity 0.2s;
    width: 100%; /* Botões ocupam largura total no mobile */
    margin-bottom: 10px;
}

.btn:active {
    opacity: 0.8;
}

.btn-primary { background-color: var(--primary-color); color: white; }
.btn-success { background-color: var(--success-color); color: white; }
.btn-danger { background-color: var(--danger-color); color: white; }
.btn-sm { 
    padding: 8px 12px; 
    font-size: 0.85rem; 
    width: auto; 
    margin-right: 5px; 
    margin-bottom: 5px; 
}

/* Dashboard e Cards */
.card {
    background: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    overflow-x: auto; /* Permite scroll em tabelas largas */
}

.card h2, .card h3 {
    margin-top: 0;
    font-size: 1.25rem;
    
}

/* Tabelas Responsivas */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    min-width: 600px; /* Garante que a tabela não quebre em telas muito pequenas */
}

th, td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    font-size: 0.9rem;
}

th { background-color: #f2f2f2; }

.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    text-transform: capitalize;
    white-space: nowrap;
}

.status-pendente { background-color: #ffeeba; color: #856404; }
.status-confirmado { background-color: #b8daff; color: #004085; }
.status-concluido { background-color: #c3e6cb; color: #155724; }
.status-cancelado { background-color: #f5c6cb; color: #721c24; }

.hidden { display: none; }

/* Filtros e Resumo Responsivos */
.filters-group {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 4px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filters-group label {
    width: 100%;
    margin-bottom: 5px;
}

.filters-group .btn {
    width: auto;
    flex: 1 1 auto;
    min-width: 120px;
}

.custom-date-filter {
    margin-top: 15px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.custom-date-filter div {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.custom-date-filter input {
    width: 100%;
    padding: 10px;
}

.summary-stats {
    display: grid;
    grid-template-columns: 1fr; /* 1 coluna no mobile */
    gap: 15px;
    margin-top: 20px;
}

.stat-box {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    border-left: 4px solid var(--primary-color);
}

.stat-box h4 {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 0.85rem;
}

.stat-box p {
    margin: 0;
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--primary-color);
}

/* Modal Responsivo */
.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
}

/* Media Queries para Tablets e Desktops */
@media (min-width: 768px) {
    .navbar {
        flex-direction: row;
        padding: 1rem 2rem;
        gap: 10px !important;
    }

    .nav-links {
        gap: 20px;
    }

    .nav-links a {
        background: transparent;
        font-size: 1rem;
    }

    .btn {
        width: auto;
    }

    .summary-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .custom-date-filter div {
        flex-direction: row;
        align-items: flex-end;
    }

    .custom-date-filter input {
        width: auto;
    }

    .stat-box p {
        font-size: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .summary-stats {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Melhoria visual para mobile: transformar tabelas em cards se necessário */
/* (Opcional, mas mantive o scroll horizontal por ser mais fiel à estrutura original) */
