/* Arquivo: assets/css/painel.css */

/* --- GLOBAL --- */
* { box-sizing: border-box; } /* Garante que padding não aumente o tamanho dos elementos */
body { display: flex; margin: 0; font-family: 'Inter', sans-serif; background-color: #f4f7fa; min-height: 100vh; overflow-x: hidden; }

/* --- SIDEBAR (Desktop) --- */
.sidebar {
    width: 260px; background-color: #003366; color: white; display: flex; flex-direction: column;
    padding: 20px 0; 
    flex-shrink: 0; height: 100vh; position: fixed; left: 0; top: 0; z-index: 1000;
    transition: transform 0.3s ease;
    box-sizing: border-box;
}

.logo { padding: 0 25px; font-size: 1.5rem; font-weight: 800; margin-bottom: 30px; display: flex; align-items: center; gap: 10px; }
/* Adicione este bloco para controlar o espaçamento entre campos de formulário */
.form-group {
    margin-bottom: 20px;
}

.btn-sair {
    margin-top: auto; /* Empurra para o final */
    margin-left: 20px;
    margin-right: 20px;
    margin-bottom: 20px; /* Distância da borda inferior da tela */
    padding: 10px;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444 !important; 
    border: 1px solid #ef4444;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: 0.3s;
    text-decoration: none;
}

.btn-sair:hover { 
    background: #ef4444 !important; /* (Brilhando) */
    color: white !important; 
    border-color: #ef4444;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.6); /* Efeito Glow vermelho */
    transform: translateY(-2px);
}

.menu-item {
    margin: 0 20px 5px 20px; 
    padding: 12px 15px; color: rgba(255, 255, 255, 0.7); text-decoration: none;
    display: flex; align-items: center; gap: 15px; border-radius: 8px;
    transition: 0.2s; font-size: 0.95rem;
}
.menu-item:hover, .menu-item.active { background-color: rgba(255, 255, 255, 0.1); color: white; }

/* Botão Ver Site */
.btn-ver-site {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    background: rgba(74, 222, 128, 0.1); color: #4ade80; border: 1px solid #4ade80;
    padding: 10px; border-radius: 8px; text-decoration: none; font-weight: 600; font-size: 0.85rem;
    margin: 0 20px 20px 20px; 
    transition: 0.3s;
}

.btn-ver-site:hover { 
    background: #4ade80; 
    color: white !important; 
    box-shadow: 0 0 15px rgba(74, 222, 128, 0.6); 
    transform: translateY(-2px); 
}

/* --- CONTEÚDO --- */
.content { flex: 1; padding: 30px; margin-left: 260px; width: calc(100% - 260px); min-width: 0; }
/* TOPBAR */
.top-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }
.menu-toggle { display: none; font-size: 1.5rem; color: #003366; cursor: pointer; border: none; background: none; padding: 0; }

/* FORMULÁRIOS & CARDS */
.card { background: white; padding: 30px; border-radius: 16px; box-shadow: 0 4px 10px rgba(0,0,0,0.03); margin-bottom: 20px; }
.form-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); 
    gap: 25px; 
    align-items: stretch;
}
.form-control { width: 100%; padding: 12px; border: 1px solid #e2e8f0; border-radius: 8px; font-size: 1rem; box-sizing: border-box; background: white; }

.btn-save { 
    background: #003366; 
    color: white; 
    border: none; 
    padding: 12px 25px; 
    border-radius: 8px; 
    font-weight: 700; 
    cursor: pointer; 
    transition: 0.2s;
}

.btn-save:hover {
    background: #004488;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 51, 102, 0.2);
}

.btn-mini-save { padding: 8px 15px; background: #003366; color: white; border: none; border-radius: 6px; cursor: pointer; float: right; }

/* ALERTAS */
.alert { padding: 15px; border-radius: 8px; margin-bottom: 20px; transition: opacity 0.5s; }
.success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }

/* --- ESTILO NOVO PARA UPLOAD (BOTÃO) --- */
.input-file-hidden { display: none; } /* Esconde o input feio */
.custom-file-upload {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    border: 1px dashed #cbd5e1;
    background-color: #f8fafc;
    color: #475569;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.9rem;
    transition: 0.2s;
    width: 100%;
    box-sizing: border-box;
    margin-top: 5px;
}
.custom-file-upload:hover { background-color: #e2e8f0; border-color: #94a3b8; }
.custom-file-upload i { font-size: 1.1rem; }

/* --- RESPONSIVO (MOBILE) --- */
@media (max-width: 992px) {
    .sidebar {
        width: 260px; 
        background-color: #003366; 
        color: white; 
        display: flex; 
        flex-direction: column; 
        padding: 20px 0; 
        height: 100vh; 
        position: fixed; /* Alterado para fixed */
        left: 0;         /* Alinhado à esquerda */
        top: 0;          /* Alinhado ao topo */
        transform: translateX(-100%); /* Começa totalmente fora do ecrã */
        z-index: 2000;   /* Fica acima de tudo no mobile */
        transition: transform 0.3s ease;
        box-sizing: border-box;
    }
    .content { 
        margin-left: 0; /* Remove a margem no celular */
        width: 100%; 
        padding: 15px; 
    }
    /* Quando ativo, desliza para dentro */
    .sidebar.active { 
        transform: translateX(0); 
        box-shadow: 5px 0 15px rgba(0,0,0,0.2); 
    }
    
    /* Overlay escuro */
    .overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 1500; }
    .overlay.active { display: block; }

    /* Ajustes Gerais apenas para Mobile */
    .content { padding: 15px; }
    .form-grid { grid-template-columns: 1fr; }
    .menu-toggle { display: block; margin-right: 15px; }
    .card { padding: 20px; }

    /* --- MODIFICAÇÃO GLOBAL PARA SELECTS --- */
/* Aplica estilo profissional a qualquer select com a classe .form-control */
select.form-control {
    /* 1. Remove a seta padrão (feia) do navegador */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;

    /* 2. Adiciona a nova seta moderna (SVG embutido para performance) */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23334155' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    
    /* 3. Posiciona com "respiro" da borda direita (15px) */
    background-position: right 15px center;
    background-size: 16px;
    
    /* 4. Garante espaço interno para o texto não sobrepor a seta */
    padding-right: 40px !important;
    cursor: pointer;
}
/* --- COMPONENTES: TABELAS E LISTAS --- */
.table-custom { width: 100%; border-collapse: collapse; margin-top: 20px; }
.table-custom th { text-align: left; padding: 12px; color: #64748b; border-bottom: 2px solid #f1f5f9; font-size: 0.85rem; }
.table-custom td { padding: 15px 12px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }

/* Avatar Genérico (Usado em Clientes, Equipe, etc) */
.avatar-circle {
    width: 40px; height: 40px; 
    background: #e0f2fe; color: #0284c7; 
    border-radius: 50%; 
    display: flex; align-items: center; justify-content: center; 
    font-weight: bold; flex-shrink: 0;
}

/* Infos e Stats (Pequenos textos abaixo de nomes) */
.item-stats { display: flex; gap: 15px; font-size: 0.8rem; color: #64748b; margin-top: 5px; }
.item-stats i { margin-right: 5px; }

/* --- BOTÕES DE AÇÃO RÁPIDA (Quadrados) --- */
.btn-action { 
    width: 32px; height: 32px; border-radius: 8px; 
    display: inline-flex; align-items: center; justify-content: center; 
    border: none; cursor: pointer; transition: 0.2s; text-decoration: none; 
    margin-left: 5px; font-size: 0.9rem;
}
.btn-action:hover { transform: translateY(-2px); filter: brightness(0.95); }

.btn-whats { background: #dcfce7; color: #16a34a; }
.btn-view { background: #e0f2fe; color: #0284c7; }
.btn-trash { background: #fee2e2; color: #ef4444; }

/* --- MODAL PADRÃO (Centralizado) --- */
.modal-overlay { 
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; 
    background: rgba(0,0,0,0.5); z-index: 2000; 
    align-items: center; justify-content: center; 
}
.modal-box { 
    background: white; width: 90%; max-width: 500px; 
    border-radius: 12px; padding: 25px; 
    max-height: 80vh; overflow-y: auto; 
    box-shadow: 0 10px 25px rgba(0,0,0,0.2); 
}
.modal-header { 
    display: flex; justify-content: space-between; align-items: center; 
    margin-bottom: 15px; border-bottom: 1px solid #eee; padding-bottom: 10px; 
}
.modal-close { cursor: pointer; font-size: 1.5rem; color: #999; transition: 0.2s; }
.modal-close:hover { color: #ef4444; }

/* Tabela simples para dentro de modais */
.table-simple { width: 100%; border-collapse: collapse; }
.table-simple td { padding: 10px; border-bottom: 1px solid #f1f5f9; font-size: 0.9rem; }
}

/* --- SISTEMA DE NOTIFICAÇÕES CUSTOMIZADO --- */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    min-width: 250px;
    padding: 15px 20px;
    border-radius: 10px;
    background: white;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s ease forwards;
    border-left: 5px solid var(--cor-pri); /* Usa a cor principal da barbearia */
}

.toast.sucesso { border-left-color: #22c55e; }
.toast.erro { border-left-color: #ef4444; }
.toast.aviso { border-left-color: var(--cor-sec); } /* Usa a cor secundária */

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.toast.hide {
    animation: slideOut 0.3s ease forwards;
}

@keyframes slideOut {
    to { transform: translateX(100%); opacity: 0; }
}

/* --- MODAL DE CONFIRMAÇÃO SIMPLIFICADO --- */
.modal-confirmacao {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    align-items: center; justify-content: center;
}

.modal-confirmacao-box {
    background: white;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.modal-confirmacao-box h3 {
    margin: 0 0 15px 0;
    color: #1e293b;
    font-size: 1.3rem;
}

.modal-confirmacao-box p {
    color: #64748b;
    margin-bottom: 25px;
}

.modal-confirmacao-botoes {
    display: flex;
    gap: 15px;
}

.btn-confirma {
    flex: 1;
    padding: 12px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
    font-size: 0.95rem;
}

/* Botão Sim (Confirmar) - Verde */
.btn-sim {
    border: 2px solid #22c55e;
    color: #000;
}

.btn-sim:hover {
    background: #22c55e;
    color: white;
    transform: translateY(-3px);
}

/* Botão Não (Negar/Cancelar) - Vermelho */
.btn-nao {
    border: 2px solid #ef4444;
    color: #000;
}

.btn-nao:hover {
    background: #ef4444;
    color: white;
    transform: translateY(-3px);
}