/* css/style.css */
/* Versão Final Corrigida - Paleta de Cores da Logo EBS */

/* --- 1. VARIÁVEIS DE COR E GLOBAIS --- */
:root {
    --azul-principal: #4A657A;
    /* Azul-acinzentado da logo */
    --azul-escuro: #263248;
    /* Azul marinho do fundo da logo */
    --azul-destaque: #6B8497;
    /* Tom mais claro para hover/detalhes */
    --branco: #FFFFFF;
    --fundo-claro: #f8f9fa;
    /* Cinza muito claro para fundos internos */

    /* Cores para status (exemplo) */
    --cor-sucesso: #198754;
    --cor-aviso: #ffc107;
    --cor-perigo: #dc3545;
    --cor-info: #0dcaf0;

    /* Cores para transparência */
    --branco-transparente: rgba(255, 255, 255, 0.2);
    --preto-transparente: rgba(0, 0, 0, 0.2);
    --sombra: rgba(0, 0, 0, 0.3);
}

/* Estrutura para fixar o rodapé na parte inferior da tela */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

main {
    flex-shrink: 0;
    flex-grow: 1;
}

/* --- 2. TELA DE LOGIN --- */
.login-background {
    background-color: var(--azul-escuro);
    background-image: linear-gradient(145deg, var(--azul-escuro) 0%, #3d5266 100%);
    color: var(--branco);
}

.login-card {
    background: rgba(74, 101, 122, 0.15);
    border-radius: 15px;
    padding: 2.5rem;
    border: 1px solid rgba(107, 132, 151, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px 0 var(--sombra);
}

.logo-container {
    text-align: center;
    margin-bottom: 1.5rem;
}

.login-logo {
    max-width: 180px;
    height: auto;
    animation: floatAnimation 3s ease-in-out infinite;
}

@keyframes floatAnimation {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0);
    }
}

.login-card .input-group-text {
    background-color: var(--preto-transparente);
    border: 1px solid var(--branco-transparente);
    color: var(--branco);
}

.login-card .form-control {
    background: transparent;
    border: 1px solid var(--branco-transparente);
    color: var(--branco);
}

.login-card .form-control::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.login-card .form-control:focus {
    background: transparent;
    color: var(--branco);
    border-color: var(--azul-destaque);
    box-shadow: 0 0 0 0.25rem rgba(107, 132, 151, 0.5);
}

.btn-login {
    background-color: var(--azul-principal);
    color: var(--branco);
    border: none;
    padding: 0.75rem;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-login:hover {
    background-color: var(--azul-destaque);
    color: var(--branco);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px var(--sombra);
}

/* --- 3. ESTILOS DAS PÁGINAS INTERNAS --- */
body:not(.login-background) {
    background-color: var(--fundo-claro);
}

.navbar-custom {
    background-color: var(--azul-escuro) !important;
}

/* CARDS DE PRODUTO */
.card-produto {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.card-produto:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.card-produto .card-img-top {
    width: 100%;
    height: 150px;
    object-fit: contain;
    padding: 0.5rem;
    background-color: #ffffff;
}

.card-produto .card-title {
    font-size: 0.95rem;
    font-weight: 600;
    min-height: 40px;
}

.card-produto .card-text {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--azul-principal);
}

#carrinho-itens {
    max-height: 45vh;
    overflow-y: auto;
}

/* PÁGINA DE NOVO PEDIDO */
.carrinho-container {
    max-height: 45vh;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
}

.input-valor-final {
    text-align: right;
}

.ajuste-feedback {
    font-size: 0.75rem;
    margin-top: 2px;
    height: 15px;
}

/* --- 4. DASHBOARD, GRÁFICOS E TABELAS --- */
.dashboard-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    border-radius: 0.75rem;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.dashboard-card .card-body {
    position: relative;
    overflow: hidden;
}

.dashboard-card .fa-icon-bg {
    position: absolute;
    top: -10px;
    right: -15px;
    font-size: 5rem;
    color: rgba(255, 255, 255, 0.15);
    transform: rotate(-20deg);
    transition: transform 0.5s ease;
}

.dashboard-card:hover .fa-icon-bg {
    transform: rotate(-10deg) scale(1.1);
}

.card-footer a {
    transition: opacity 0.2s;
}

.card-footer a:hover {
    opacity: 0.8;
}

.table thead {
    background-color: var(--azul-principal);
    color: var(--branco);
}

.table tbody tr:hover {
    background-color: #e9ecef;
}

.badge {
    font-size: 0.85em;
    padding: 0.5em 0.7em;
    font-weight: 600;
}

/* Gráficos Analíticos */
.chart-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.25rem;
}

.chart-actions .btn {
    padding: 0.1rem 0.4rem;
    font-size: 0.75rem;
}

.drag-handle {
    cursor: move;
    color: #adb5bd;
    margin-left: 0.5rem;
    padding: 0.25rem;
}

.sortable-ghost {
    opacity: 0.4;
    background-color: rgba(107, 132, 151, 0.2);
    border: 2px dashed var(--azul-principal);
}

.sortable-item {
    cursor: pointer;
}

/* --- 5. MODAIS E ABAS --- */
#detalhesModal .modal-body,
#pedidosModal .modal-body {
    background-color: var(--fundo-claro);
}

#detalhesModal .table,
#pedidosModal .table {
    margin-bottom: 0;
}

/* Estilos para a página Análise de Clientes */
#myTab .nav-link {
    font-weight: 500;
}

#myTab .nav-link.active {
    font-weight: bold;
    color: var(--azul-escuro);
}

/* Modal de Detalhes de Pedido */
#pedidosModal .accordion-button {
    font-size: 0.9rem;
    padding: 0.75rem 1.25rem;
}

#pedidosModal .accordion-body {
    padding: 0.5rem 1rem;
}

/* --- 6. MEDIA QUERIES --- */
@media (min-width: 992px) {

    #carrinho-itens,
    .carrinho-container {
        max-height: 60vh;
    }
}