/* === Reset Básico === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

/* === Painel Principal === */
.painel-parceiro-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* === Header - Sem fundo azul, agora com fundo branco e borda sutil === */
.painel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 30px;
    background: white;
    color: #1e293b;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 20px;
}

.painel-header h1 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #1e293b;
}

.painel-logout {
    background: #f8fafc;
    color: #333;
    text-decoration: none;
    padding: 10px 16px;
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-size: 0.95rem;
    font-weight: 500;
}

.painel-logout:hover {
    background: #e2e8f0;
    border-color: #94a3b8;
}

/* === Formulário === */
#form-alterar-roteiro-privativo {
    padding: 20px;
}

.painel-form-grupo {
    margin-bottom: 20px;
}

.painel-form-grupo label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2d3748;
    font-size: 0.95rem;
}

/* === Inputs e Selects === */
select,
input[type="text"],
input[type="time"],
textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    transition: border-color 0.2s ease;
}

select:focus,
input[type="text"]:focus,
input[type="time"]:focus,
textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

/* === Seleção de Embarcação e Roteiro === */
#selecionar_embarcacao_alteracao,
#selecionar_roteiro_alteracao {
    padding: 12px;
    font-size: 1rem;
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    background: white;
    min-height: 48px;
}

/* === Locais de Embarque === */
#locais-embarque-container-alteracao {
    margin-top: 20px;
}

.local-embarque-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 16px;
    position: relative;
    transition: box-shadow 0.2s ease;
}

.local-embarque-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.local-embarque-item h4 {
    margin-bottom: 12px;
    color: #1e293b;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-excluir-local {
    background: #dc2626;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background 0.2s ease;
}

.btn-excluir-local:hover {
    background: #b91c1c;
}

.location-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

/* === Botões de Adicionar Local === */
.botoes-locais {
    text-align: right;
    margin-bottom: 20px;
}

#btn-adicionar-local {
    background: #10b981;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: background 0.2s ease;
    font-weight: 500;
}

#btn-adicionar-local:hover {
    background: #059669;
}

/* === Galeria de Fotos === */
#galeria-atual-container {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.imagem-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px;
    background: #f8fafc;
    transition: transform 0.2s ease;
}

.imagem-item:hover {
    transform: scale(1.02);
}

.imagem-item img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 6px;
}

.remover-imagem {
    margin-top: 6px;
    padding: 4px 8px;
    background: #dc2626;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background 0.2s ease;
}

.remover-imagem:hover {
    background: #b91c1c;
}

/* === Botões de Ação === */
.painel-botoes-container {
    display: flex;
    gap: 16px;
    margin-top: 24px;
    justify-content: flex-end;
}

.painel-submit {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.painel-submit.danger {
    background: #dc2626;
    color: white;
}

.painel-submit.danger:hover {
    background: #b91c1c;
}

.painel-submit {
    background: #3b82f6;
    color: white;
}

.painel-submit:hover {
    background: #2563eb;
}

.painel-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* === Mensagem de Sucesso === */
.painel-mensagem-sucesso {
    padding: 16px;
    background: #10b981;
    color: white;
    border-radius: 8px;
    margin-top: 16px;
    text-align: center;
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === Responsividade === */
@media (max-width: 768px) {
    .painel-parceiro-container {
        margin: 20px;
        padding: 16px;
    }

    .painel-header {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }

    .painel-header h1 {
        font-size: 1.6rem;
        margin-bottom: 10px;
    }

    .painel-logout {
        width: 100%;
        max-width: 200px;
        margin: 0 auto;
    }

    .location-fields {
        grid-template-columns: 1fr;
    }

    .painel-botoes-container {
        flex-direction: column;
    }

    .painel-submit {
        width: 100%;
    }
}