/* Variáveis CSS para customização fácil baseadas no original */
:root {
    /* Cores principais */
    --cor-primaria: #4a6fc7;
    --cor-primaria-escura: #3b5aa6;
    --cor-editar: #f39c12;
    --cor-editar-escura: #e67e22;
    --cor-cancelar: #e74c3c;
    --cor-cancelar-escura: #c0392b;
    
    /* Cores de mensagens */
    --cor-sucesso: #155724;
    --cor-fundo-sucesso: #d4edda;
    --cor-borda-sucesso: #c3e6cb;
    --cor-erro: #721c24;
    --cor-fundo-erro: #f8d7da;
    --cor-borda-erro: #f5c6cb;
    
    /* Gradientes e fundos */
    --fundo-escuro: linear-gradient(135deg, #1a2a6c 0%, #2a5298 100%);
    --fundo-claro: #ffffff;
    --fundo-header: #4a6fc7;
    --fundo-agendamento: #f8f9fa;
    --fundo-edicao: #fff8e1;
    
    /* Cores de texto */
    --texto-escuro: #333333;
    --texto-claro: #ffffff;
    --texto-label: #2c3e50;
    --texto-footer: #6c757d;
    
    /* Bordas e sombras */
    --borda-padrao: #ddd;
    --borda-agendamento: #e9ecef;
    --sombra-padrao: 0 10px 30px rgba(0, 0, 0, 0.2);
    --sombra-leve: 0 5px 15px rgba(0, 0, 0, 0.1);
    
    /* Bordas arredondadas */
    --radius-padrao: 12px;
    --radius-input: 6px;
    --radius-pequeno: 8px;
    --radius-botao: 6px;
}

/* Reset e estilos base - FIEL AO ORIGINAL */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: var(--fundo-escuro);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* Container principal - FIEL AO ORIGINAL */
.container {
    background: var(--fundo-claro);
    border-radius: var(--radius-padrao);
    box-shadow: var(--sombra-padrao);
    width: 100%;
    max-width: 600px;
    overflow: hidden;
}

/* Cabeçalho - FIEL AO ORIGINAL */
.header {
    background: var(--fundo-header);
    color: var(--texto-claro);
    padding: 25px;
    text-align: center;
}

.header h1 {
    font-weight: 600;
    font-size: 28px;
    margin-bottom: 10px;
}

.header p {
    opacity: 0.9;
}

/* Formulários - FIEL AO ORIGINAL */
.form-container {
    padding: 25px;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--texto-escuro);
}

input, select {
    width: 100%;
    padding: 14px;
    border: 1px solid var(--borda-padrao);
    border-radius: var(--radius-input);
    font-size: 16px;
    transition: border-color 0.3s;
}

input:focus, select:focus {
    border-color: var(--cor-primaria);
    outline: none;
    box-shadow: 0 0 0 2px rgba(74, 111, 199, 0.2);
}

/* Botões - FIEL AO ORIGINAL */
button {
    padding: 16px;
    background: var(--cor-primaria);
    color: var(--texto-claro);
    border: none;
    border-radius: var(--radius-botao);
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    width: 100%;
    margin-bottom: 10px;
}

button:hover {
    background: var(--cor-primaria-escura);
}

.btn-editar {
    background: var(--cor-editar);
}

.btn-editar:hover {
    background: var(--cor-editar-escura);
}

.btn-cancelar {
    background: var(--cor-cancelar);
}

.btn-cancelar:hover {
    background: var(--cor-cancelar-escura);
}

/* Mensagens - FIEL AO ORIGINAL */
#mensagem {
    margin-top: 20px;
    padding: 15px;
    border-radius: var(--radius-input);
    text-align: center;
    font-weight: 500;
}

.success {
    padding: 15px;
    background-color: var(--cor-fundo-sucesso);
    color: var(--cor-sucesso);
    border: 1px solid var(--cor-borda-sucesso);
}

.error {
    padding: 15px;
    background-color: var(--cor-fundo-erro);
    color: var(--cor-erro);
    border: 1px solid var(--cor-borda-erro);
}

/* Informações de agendamento - FIEL AO ORIGINAL */
.agendamento-info {
    background-color: var(--fundo-agendamento);
    border-radius: var(--radius-pequeno);
    padding: 20px;
    margin-top: 20px;
    border-left: 4px solid var(--cor-primaria);
}

.agendamento-item {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--borda-agendamento);
}

.agendamento-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.agendamento-label {
    font-weight: 600;
    color: var(--texto-label);
    display: inline-block;
    width: 120px;
}

/* Rodapé - FIEL AO ORIGINAL */
.footer {
    text-align: center;
    padding: 20px;
    color: var(--texto-footer);
    font-size: 14px;
    border-top: 1px solid #eee;
}

/* Links - FIEL AO ORIGINAL */
.voltar-link {
    display: block;
    text-align: center;
    margin-top: 20px;
    color: var(--cor-primaria);
    text-decoration: none;
}

.voltar-link:hover {
    text-decoration: underline;
}

/* Formulário de edição - FIEL AO ORIGINAL */
.form-edicao {
    background-color: var(--fundo-edicao);
    border-radius: var(--radius-pequeno);
    padding: 20px;
    margin-top: 20px;
    border-left: 4px solid var(--cor-editar);
    display: none;
}

/* Botões de ação - FIEL AO ORIGINAL */
.acoes-botoes {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.acoes-botoes button {
    width: auto;
    flex: 1;
}

/* Horários disponíveis - FIEL AO ORIGINAL */
.horarios-disponiveis {
    margin-top: 15px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: var(--radius-input);
    border-left: 4px solid var(--cor-primaria);
}

.horarios-disponiveis h3 {
    margin-bottom: 10px;
    color: var(--texto-escuro);
    font-size: 18px;
}

.horarios-lista {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}


/* Info horários - FIEL AO ORIGINAL */
.info-horarios {
    background-color: #e8f4fd;
    padding: 15px;
    border-radius: var(--radius-input);
    margin-bottom: 20px;
    border-left: 4px solid #2196F3;
}

.info-horarios h3 {
    color: #0b5e9e;
    margin-bottom: 10px;
}

.info-horarios ul {
    list-style-type: none;
}

.info-horarios li {
    margin-bottom: 5px;
    display: flex;
    align-items: center;
}

.info-horarios li::before {
    content: "•";
    color: #2196F3;
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-right: 5px;
}

/* Responsividade - FIEL AO ORIGINAL */
@media (max-width: 600px) {
    .container {
        margin: 10px;
    }
    
    .header {
        padding: 20px;
    }
    
    .form-container {
        padding: 20px;
    }
    
    .acoes-botoes {
        flex-direction: column;
    }
}

/* Estilos para a página de consulta (meuag.php) */
#agendamentosLista {
    margin-top: 20px;
}

/* Estilos para a página de admin */
.login-container {
    background: white;
    border-radius: var(--radius-padrao);
    box-shadow: var(--sombra-padrao);
    width: 100%;
    max-width: 400px;
    overflow: hidden;
}

.login-header {
    background: var(--cor-primaria);
    color: white;
    padding: 25px;
    text-align: center;
}

.login-header h1 {
    font-weight: 600;
    font-size: 28px;
    margin-bottom: 10px;
}

.login-form {
    padding: 25px;
}

.btn-login {
    width: 100%;
    padding: 16px;
    background: var(--cor-primaria);
    color: white;
    border: none;
    border-radius: var(--radius-input);
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-login:hover {
    background: var(--cor-primaria-escura);
}

/* Estilos para a página de agendamentos admin */
.agendamentos-container {
    background: white;
    border-radius: var(--radius-padrao);
    box-shadow: var(--sombra-leve);
    padding: 25px;
    margin-bottom: 30px;
}

.agendamentos-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f1f2f6;
}

.total-agendamentos {
    background: #3498db;
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 500;
}

table {
    width: 100%;
    border-collapse: collapse;
}

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

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

tr:hover {
    background-color: #f9f9f9;
}

.btn-whatsapp {
    background: #25D366;
    color: white;
    border: none;
    border-radius: var(--radius-input);
    padding: 8px 15px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background 0.3s;
    margin-right: 8px;
}

.btn-whatsapp:hover {
    background: #128C7E;
}

.btn-deletar {
    background: var(--cor-cancelar);
    color: white;
    border: none;
    border-radius: var(--radius-input);
    padding: 8px 15px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background 0.3s;
}

.btn-deletar:hover {
    background: var(--cor-cancelar-escura);
}

.hoje {
    background-color: #e8f5e9 !important;
}

.proximo {
    background-color: #fff8e1 !important;
}

.sem-agendamentos {
    text-align: center;
    padding: 40px;
    color: #7f8c8d;
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
    color: #2c3e50;
}

.btn-logout {
    background: var(--cor-cancelar);
    color: white;
    border: none;
    border-radius: var(--radius-input);
    padding: 8px 15px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.btn-logout:hover {
    background: var(--cor-cancelar-escura);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    border-radius: var(--radius-padrao);
    padding: 25px;
    width: 90%;
    max-width: 400px;
    box-shadow: var(--sombra-padrao);
}

.modal-header {
    margin-bottom: 20px;
}

.modal-header h3 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.modal-input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--borda-padrao);
    border-radius: var(--radius-input);
    font-size: 16px;
    margin-bottom: 15px;
}

.modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.btn-cancelar-modal {
    background: #95a5a6;
    color: white;
    border: none;
    border-radius: var(--radius-input);
    padding: 10px 20px;
    cursor: pointer;
}

.btn-confirmar {
    background: var(--cor-cancelar);
    color: white;
    border: none;
    border-radius: var(--radius-input);
    padding: 10px 20px;
    cursor: pointer;
}

.btn-cancelar-modal:hover {
    background: #7f8c8d;
}

.btn-confirmar:hover {
    background: var(--cor-cancelar-escura);
}

/* Toast notifications */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: #4CAF50;
    color: white;
    padding: 16px 24px;
    border-radius: var(--radius-input);
    box-shadow: var(--sombra-padrao);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 10px;
    transform: translateX(100%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast.error {
    background-color: var(--cor-cancelar);
}

/* Responsividade para admin */
@media (max-width: 800px) {
    .filtros {
        flex-direction: column;
    }
    
    .filtro-group {
        width: 100%;
    }
    
    .agendamentos-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .user-info {
        align-items: center;
        margin-top: 15px;
    }
    
    th:nth-child(4), 
    td:nth-child(4),
    th:nth-child(5), 
    td:nth-child(5) {
        display: none;
    }
}

@media (max-width: 665px) {
    #tabela-agendamentos {
        display: none;
    }
    
    #card-agendamentos {
        display: block;
    }
}

@media (min-width: 666px) {
    #tabela-agendamentos {
        display: table;
    }
    
    #card-agendamentos {
        display: none;
    }
}

/* Adicione isso ao main.css */
.horarios-disponiveis {
    margin-top: 15px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: var(--radius-input);
    border-left: 4px solid var(--cor-primaria);
}

.horarios-disponiveis h3 {
    margin-bottom: 10px;
    color: var(--texto-escuro);
    font-size: 18px;
}

.horarios-lista {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.horario-item {
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
}

/* Estilos para os radio buttons de horário */
.horarios-lista {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin: 15px 0;
}

.horario-item {
    position: relative;
}

.horario-item input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.horario-item label {
    display: block;
    padding: 12px;
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.horario-item input[type="radio"]:checked + label {
    background: #4361ee;
    color: white;
    border-color: #4361ee;
    transform: scale(1.05);
}

.horario-item label:hover {
    border-color: #4361ee;
    background: #e9ecef;
}

/* Validação visual */
.horario-item input[type="radio"]:required + label {
    border-left: 3px solid #28a745;
}

.horario-item input[type="radio"]:checked:required + label {
    border-left: 3px solid #dc3545;
}

/* Estilo minimalista */
.sistema-inativo-minimal {
    display: flex;
    align-items: center;
    background-color: #f8f9fa;
    border-left: 3px solid #6c757d;
    padding: 12px 15px;
    margin: 15px 0;
    font-size: 14px;
    border-radius: 4px;
}

.info-icon {
    margin-right: 12px;
    font-size: 16px;
}

.retorno-text {
    font-size: 13px;
    font-style: italic;
}