body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f7f6;
    margin: 0;
    padding: 0;
}

.navbar {
    background-color: #343a40;
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* Permitir quebra de linha em telas pequenas */
}

.navbar h1 {
    margin: 0;
    font-size: 1.5rem;
}

.navbar > div {
    display: flex;
    gap: 10px;
    margin-top: 5px; /* Espaço para quando quebrar linha */
}

.logout-btn {
    background-color: #dc3545;
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
}

.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.action-buttons .logout-btn {
    white-space: nowrap;
}

.action-form {
    margin: 0;
    display: inline-block;
}

.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

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

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Responsivo: colunas se ajustam */
    gap: 2rem;
    margin-bottom: 2rem;
}

.card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.card h3 {
    margin-top: 0;
    color: #6c757d;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.card .value {
    font-size: 2rem;
    font-weight: bold;
    color: #333;
}

.section-title {
    margin-bottom: 1rem;
    color: #333;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0.5rem;
    font-size: 1.2rem;
}

.tables-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.table-card {
    background: #fff;
    border-left: 5px solid #28a745; /* Green for available */
    padding: 1rem;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.table-card.occupied {
    border-left-color: #dc3545; /* Red for occupied */
}

.table-card h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
}

.table-card p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: #f8f9fa;
    font-weight: 600;
}

tr:last-child td {
    border-bottom: none;
}

/* Responsividade Mobile */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .navbar h1 {
        margin-bottom: 10px;
    }
    
    .navbar > div {
        width: 100%;
        justify-content: space-between;
    }
    
    .logout-btn {
        flex: 1;
        text-align: center;
    }

    .action-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .action-buttons .logout-btn {
        width: 100%;
    }

    .container {
        padding: 0 0.5rem;
    }
    
    .metrics-grid {
        grid-template-columns: 1fr; /* 1 coluna em mobile */
        gap: 1rem;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr; /* 1 coluna em mobile */
        gap: 1rem;
    }
    
    .tables-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); /* Cards menores em mobile */
    }
    
    table {
        font-size: 0.9rem; /* Fonte menor em tabelas */
    }
    
    th, td {
        padding: 8px 10px; /* Menos padding */
    }
    
    /* Scroll horizontal para tabelas se necessário */
    .table-responsive {
        overflow-x: auto;
    }
    .clients-table th:nth-child(6),
    .clients-table td:nth-child(6) {
        display: none;
    }
}

.cs-footer {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #ffffff;
    border-top: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.cs-footer-logo {
    max-height: 28px;
    width: auto;
    height: auto;
}

.cs-footer-text {
    color: #6c757d;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.login-logo {
    display: block;
    margin: 0 auto 12px auto;
    width: clamp(72px, 35%, 110px);
    height: auto;
}

.login-page {
    background-color: #0f121a;
    color: #e9ecef;
}

.login-card {
    background: #1a1f2b;
    color: #e9ecef;
    border-radius: 10px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.35);
}

.login-card .section-title {
    color: #e9ecef;
    border-bottom-color: #273045;
}

.login-card input[type="text"],
.login-card input[type="password"] {
    background: #0f1422;
    border: 1px solid #273045;
    color: #e9ecef;
}

.login-btn {
    background-color: #0d6efd;
    color: #fff;
    border: none;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
}

.login-btn:hover {
    background-color: #0b5ed7;
}
