/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #e63946;
    --secondary-color: #f77f00;
    --success-color: #06d6a0;
    --danger-color: #ef476f;
    --warning-color: #ffd60a;
    --info-color: #118ab2;
    --dark-color: #2b2d42;
    --light-color: #edf2f4;
    --white: #ffffff;
    --gray: #8d99ae;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Utilitários */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.text-muted { color: var(--gray); }
.text-success { color: var(--success-color); }
.text-danger { color: var(--danger-color); }
.text-info { color: var(--info-color); }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }

/* Botões */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #d62839;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn-secondary {
    background-color: var(--gray);
    color: white;
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-sm {
    padding: 5px 15px;
    font-size: 14px;
}

.btn-lg {
    padding: 15px 30px;
    font-size: 18px;
}

.btn-block {
    display: block;
    width: 100%;
}

/* Formulários */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--dark-color);
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.form-row .form-group {
    flex: 1;
    min-width: 200px;
}

.col-md-2 { flex: 0 0 16.66%; }
.col-md-3 { flex: 0 0 25%; }
.col-md-4 { flex: 0 0 33.33%; }
.col-md-6 { flex: 0 0 50%; }
.col-md-8 { flex: 0 0 66.66%; }
.col-md-12 { flex: 0 0 100%; }

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* Alertas */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-primary { background-color: var(--primary-color); color: white; }
.badge-secondary { background-color: var(--gray); color: white; }
.badge-success { background-color: var(--success-color); color: white; }
.badge-danger { background-color: var(--danger-color); color: white; }
.badge-warning { background-color: var(--warning-color); color: var(--dark-color); }
.badge-info { background-color: var(--info-color); color: white; }

/* Tabelas */
.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.table thead {
    background-color: var(--dark-color);
    color: white;
}

.table th,
.table td {
    padding: 15px;
    text-align: left;
}

.table tbody tr {
    border-bottom: 1px solid #eee;
    transition: background-color 0.3s;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Modal - Z-index Máximo */
.modal {
    display: none;
    position: fixed;
    z-index: 15000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    overflow-y: auto;
    backdrop-filter: blur(5px);
    padding: 20px;
    box-sizing: border-box;
}

.modal.show {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
    padding-top: 50px;
}

.modal-content {
    background-color: white;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    margin: 0 auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.4);
    animation: modalFadeIn 0.3s;
    position: relative;
    z-index: 15001;
    overflow-y: auto;
}

.modal-lg {
    max-width: 900px;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    color: var(--dark-color);
}

.close {
    font-size: 30px;
    font-weight: bold;
    color: var(--gray);
    cursor: pointer;
    border: none;
    background: none;
    padding: 5px;
    width: 35px;
    height: 35px;
    line-height: 1;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 15002; /* Z-index máximo para botão fechar */
}

.close:hover {
    color: var(--primary-color);
    background: #f8f9fa;
    transform: scale(1.1);
}

.modal-content form {
    padding: 25px;
}

.form-actions {
    margin-top: 30px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* Header Principal */
.main-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 60px 0;
    text-align: center;
    margin-bottom: 40px;
}

.main-header h1 {
    font-size: 48px;
    margin-bottom: 10px;
}

.main-header p {
    font-size: 20px;
    opacity: 0.9;
}

/* Footer */
.main-footer {
    background-color: var(--dark-color);
    color: white;
    padding: 40px 0;
    margin-top: 60px;
    text-align: center;
}

.footer-links {
    margin-bottom: 20px;
}

.footer-links a {
    color: white;
    text-decoration: none;
    margin: 0 15px;
    transition: opacity 0.3s;
}

.footer-links a:hover {
    opacity: 0.7;
}

/* Página de Login */
.login-page {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    width: 100%;
    max-width: 450px;
    padding: 20px;
}

.login-box {
    background: white;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.login-footer {
    margin-top: 20px;
    text-align: center;
}

.login-footer a {
    color: var(--primary-color);
    text-decoration: none;
}

/* Grid de Restaurantes */
.restaurantes-list {
    padding: 40px 0;
}

.restaurantes-list h2 {
    text-align: center;
    margin-bottom: 40px;
    color: var(--dark-color);
    font-size: 32px;
}

.restaurantes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.restaurante-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.restaurante-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 25px rgba(0,0,0,0.15);
}

.restaurante-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 15px;
}

.restaurante-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
    margin-bottom: 15px;
}

.restaurante-card h3 {
    color: var(--dark-color);
    margin-bottom: 10px;
}

.restaurante-info {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    font-size: 14px;
    color: var(--gray);
}

/* Responsivo */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
    }
    
    .form-row .form-group {
        flex: 1 1 100%;
    }
    
    .main-header h1 {
        font-size: 32px;
    }
    
    .restaurantes-grid {
        grid-template-columns: 1fr;
    }
}

