:root {
    /* Cores Oficiais da Marca Calibramed */
    --brand-roxo: #423460;
    --brand-verde: #8A9A40;
    --brand-vermelho: #E3242B;

    /* Configuração de Cores do Sistema (UI) */
    --primary-color: var(--brand-roxo);     /* Cor principal de botões e destaques */
    --primary-hover: #31264a;               /* Roxo um pouco mais escuro para hover */
    
    --secondary-color: var(--brand-verde);  /* Cor secundária para pastas ativas ou ícones */
    --secondary-hover: #728034;             /* Verde mais escuro para hover */
    
    --danger-color: var(--brand-vermelho);  /* Cor para o botão de sair ou alertas */
    --danger-hover: #bd1d23;

    /* Fundos e Textos */
    --bg-color: #f8fafc;                    /* Fundo geral da página (cinza gelo bem limpo) */
    --card-bg: #ffffff;                     /* Fundo branco para os painéis */
    --text-color: #334155;                  /* Cinza escuro elegante para o texto comum */
    --title-color: var(--brand-roxo);       /* Títulos usando a cor da marca */
    --border-color: #e2e8f0;                /* Linhas divisórias sutis */
    
    --border-radius: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Segoe UI', Roboto, sans-serif;
}
body {
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh; /* Ajustado para min-height para telas longas */
}

/* Títulos do Painel */
h1, h2, h3, h4, .title-secao {
    color: var(--title-color);
}

/* Botões do Painel Principal e Login */
.btn-submit, .btn-filtrar {
    background-color: var(--primary-color);
    color: white;
}
.btn-submit:hover, .btn-filtrar:hover {
    background-color: var(--primary-hover);
}

/* Botão de Sair */
.btn-logout {
    background-color: var(--danger-color);
    color: white;
}
.btn-logout:hover {
    background-color: var(--danger-hover);
}

/* Cartões de Pastas */
.card-pasta.ativo {
    background-color: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
}
.card-pasta:hover {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}

.login-container {
    background-color: var(--card-bg);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    width: 100%;
    max-width: 400px;
}

.login-container h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.btn-submit {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-submit:hover {
    background-color: var(--primary-hover);
}

.alert {
    padding: 0.75rem;
    margin-bottom: 1rem;
    border-radius: var(--border-radius);
    background-color: #fee2e2;
    color: #991b1b;
    font-size: 0.875rem;
    text-align: center;
}

/* Estilos da Tabela de Documentos */
.table-responsive {
    overflow-x: auto;
    background: white;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.table th, .table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.875rem;
}

.table th {
    background-color: #f8fafc;
    color: #475569;
    font-weight: 600;
}

.table tbody tr:hover {
    background-color: #f1f5f9;
}

/* Botões de Ação (Circulares) */
.acoes-botoes {
    display: flex;
    gap: 0.5rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.btn-circle {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    color: white;
    font-size: 14px;
}

.btn-info { background-color: #0ea5e9; }
.btn-info:hover { background-color: #0284c7; }

.btn-success { background-color: #10b981; }
.btn-success:hover { background-color: #059669; }

.btn-warning { background-color: #f59e0b; }
.btn-warning:hover { background-color: #d97706; }
/* Filtros de Busca */
.filtros-container {
    background: #f8fafc;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    margin-bottom: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
}
.filtro-grupo {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 150px;
}
.filtro-grupo label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.25rem;
}
.filtro-grupo input, .filtro-grupo select {
    padding: 0.5rem;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: 0.9rem;
}
.btn-filtrar {
    background: #2563eb;
    color: white;
    padding: 0.5rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    height: 35px;
}
.btn-filtrar:hover { background: #1d4ed8; }

/* Paginação */
.paginacao {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}
.paginacao a, .paginacao span {
    padding: 0.5rem 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    text-decoration: none;
    color: #334155;
    background: white;
    font-weight: 500;
    font-size: 0.9rem;
}
.paginacao a:hover {
    background: #f1f5f9;
}
.paginacao .ativo {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}