/* Variáveis de cores - Identidade visual Pinho */
:root {
    /* Cores principais */
    --primary: #00529B;        /* Azul Pinho */
    --primary-dark: #003366;   /* Azul escuro */
    --primary-light: #4D90FE;  /* Azul claro */
    
    /* Cores de acento */
    --accent1: #FFCB05;        /* Amarelo Pinho */
    --accent2: #F2A900;        /* Laranja/dourado */
    
    /* Cores de fundo */
    --background: #F5F9FC;     /* Azul muito claro */
    --background-dark: #FFFFFF; /* Branco */
    
    /* Cores de texto */
    --text-dark: #333333;      /* Quase preto */
    --text-light: #FFFFFF;     /* Branco */
    --text-secondary: #666666; /* Cinza */
    
    /* Cores de borda */
    --border-light: #E0E8F0;   /* Azul acinzentado claro */
    --border-color: #D0D8E0;   /* Cinza azulado */
    
    /* Cores de status */
    --success-color: #00A859;  /* Verde */
    --warning-color: #FFCB05;  /* Amarelo Pinho */
    --error-color: #D03438;    /* Vermelho */
    
    /* Cores de automação */
    --automation-excel: #0078D7;      /* Azul Excel */
    --automation-analysis: #5B2C6F;   /* Roxo Análise */
    --automation-import: #1E8449;     /* Verde Importação */
    --automation-detail: #d35400;     /* Laranja Detalhe */
    --automation-sigra: #16a085;      /* Verde azulado Sigra */
    --automation-sap: #c0392b;        /* Vermelho SAP */
    
    /* Sombras */
    --shadow-sm: 0 2px 4px rgba(0, 82, 155, 0.1);
    --shadow-md: 0 4px 8px rgba(0, 82, 155, 0.15);
    --shadow-lg: 0 8px 16px rgba(0, 82, 155, 0.2);
    
    /* Transições */
    --transition: all 0.3s ease;
}

/* Estilos Globais */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--background);
    color: var(--text-dark);
    line-height: 1.6;
}

/* Links */
a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-dark);
}

/* Botões */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    cursor: pointer;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--text-light);
    border-color: var(--primary);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: white;
    color: var(--text-dark);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--background);
}

/* Formulários */
.form-control {
    width: 100%;
    padding: 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    background-color: var(--background-dark);
    color: var(--text-dark);
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 82, 155, 0.1);
}

/* Alertas */
.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: rgba(0, 168, 89, 0.05);
    border: 1px solid rgba(0, 168, 89, 0.2);
    color: var(--success-color);
}

.alert-warning {
    background-color: rgba(252, 203, 5, 0.05);
    border: 1px solid rgba(252, 203, 5, 0.2);
    color: var(--warning-color);
}

.alert-danger {
    background-color: rgba(208, 52, 56, 0.05);
    border: 1px solid rgba(208, 52, 56, 0.2);
    color: var(--error-color);
}

/* Grid */
.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-cols-1 {
    grid-template-columns: 1fr;
}

.grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

/* Tipografia */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

h1 {
    font-size: 2rem;
}

h2 {
    font-size: 1.75rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

h5 {
    font-size: 1.125rem;
}

h6 {
    font-size: 1rem;
}

p {
    margin-bottom: 1rem;
}

/* Utilitários */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.gap-1 {
    gap: 0.25rem;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 0.75rem;
}

.gap-4 {
    gap: 1rem;
}

.mt-1 {
    margin-top: 0.25rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-3 {
    margin-top: 0.75rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mb-1 {
    margin-bottom: 0.25rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-3 {
    margin-bottom: 0.75rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

/* Animações */
.login-animation {
    animation: fadeInUp 0.8s ease-out;
}

.login-page .login-animation {
    animation-delay: 0.2s;
}

@media (max-width: 768px) {
    .lg\:grid-cols-2 {
        grid-template-columns: 1fr;
    }

    .lg\:grid-cols-3 {
        grid-template-columns: 1fr;
    }

    .flex-col-mobile {
        flex-direction: column;
    }

    .items-start-mobile {
        align-items: flex-start;
    }
}

/* Modais */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: var(--background-dark);
    border-radius: 0.75rem;
    box-shadow: var(--shadow-lg);
    padding: 1.5rem;
    width: 90%;
    max-width: 500px;
    border: 1px solid var(--border-light);
    z-index: 1001;
    position: relative;
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-light);
}

.modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
    color: var(--primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--error-color);
}

/* Personalização do SweetAlert2 */
.swal2-popup {
    background-color: var(--background-dark) !important;
    box-shadow: var(--shadow-lg) !important;
    border-radius: 12px !important;
    border: 1px solid var(--border-light) !important;
    opacity: 1 !important;
}

.swal2-modal {
    opacity: 1 !important;
    background-color: var(--background-dark) !important;
}

.swal2-backdrop {
    background-color: rgba(0, 0, 0, 0.8) !important;
    backdrop-filter: blur(5px) !important;
}

.swal-no-transparency {
    opacity: 1 !important;
    background-color: var(--background-dark) !important;
    backdrop-filter: none !important;
}

.swal-backdrop-no-transparency {
    opacity: 1 !important;
    background-color: rgba(0, 0, 0, 0.8) !important;
}

.swal2-title, .swal2-content {
    color: var(--text-dark) !important;
}

.swal2-actions button {
    box-shadow: none !important;
    font-weight: 500 !important;
}

.swal2-confirm {
    background-color: var(--primary) !important;
}

.swal2-cancel {
    background-color: var(--text-secondary) !important;
}

/* Estilização específica para inputs de arquivo */
input[type="file"].form-control,
input[name="files"][type="file"] {
  padding: 0.6rem;
  background-color: var(--background);
  border: 2px dashed var(--border-color);
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-secondary);
}

input[type="file"].form-control:hover,
input[name="files"][type="file"]:hover {
  border-color: var(--primary);
  background-color: rgba(0, 82, 155, 0.05);
}

input[type="file"].form-control:focus,
input[name="files"][type="file"]:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(77, 144, 254, 0.2);
}

/* Estilização para o texto e o botão do file input */
input[type="file"].form-control::file-selector-button,
input[name="files"][type="file"]::file-selector-button {
  background-color: var(--primary);
  color: white;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 0.4rem;
  margin-right: 1rem;
  cursor: pointer;
  transition: var(--transition);
}

input[type="file"].form-control::file-selector-button:hover,
input[name="files"][type="file"]::file-selector-button:hover {
  background-color: var(--primary-dark);
}

/* Estilização aprimorada para o botão Processar nos modais */
.modal .btn-primary {
  background-color: var(--primary);
  color: var(--text-light);
  padding: 0.75rem 2rem;
  border-radius: 0.5rem;
  border: none;
  font-weight: 500;
  transition: var(--transition);
  box-shadow: 0 4px 6px rgba(0, 82, 155, 0.1);
  width: auto;
  margin: 0 auto;
}

.modal .btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 8px rgba(0, 82, 155, 0.15);
}

.modal .btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 82, 155, 0.1);
}

.modal .text-center {
  display: flex;
  justify-content: center;
}