/* assets/css/style.css */

.adel-crlv-container {
    margin: 20px auto;
    font-family: 'Poppins', sans-serif;
}

.adel-crlv-card {
    background: #ffffff;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

.adel-crlv-card h3 {
    margin-top: 0;
    color: #1e293b;
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.adel-crlv-card p {
    color: #64748b;
    font-size: 0.95rem;
    margin-bottom: 25px;
}

/* Área de Arrastar e Soltar */
.adel-file-drop-area {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    padding: 40px 20px;
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    background-color: #f8fafc;
    transition: all 0.3s ease;
    text-align: center;
    cursor: pointer;
    box-sizing: border-box;
}

.adel-file-drop-area.is-active {
    border-color: #3b82f6;
    background-color: #eff6ff;
}

.adel-file-msg {
    color: #475569;
    font-weight: 500;
}

.adel-file-drop-area input[type="file"] {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    cursor: pointer;
    opacity: 0;
}

/* Campos Manuais e Botões */
#crlv-placa-manual label {
    display: block;
    font-weight: 600;
    color: #334155;
    margin-bottom: 8px;
}

#crlv-placa-manual input {
    width: 100%;
    padding: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 1rem;
    box-sizing: border-box;
}

.adel-form-actions {
    margin-top: 25px;
}

.adel-btn-primary {
    background-color: #0f172a;
    color: #ffffff;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.3s ease;
}

.adel-btn-primary:hover {
    background-color: #1e293b;
}

.adel-btn-primary:disabled {
    background-color: #94a3b8;
    cursor: not-allowed;
}

/* Feedback de Sucesso/Erro */
#crlv-upload-feedback {
    margin-top: 15px;
    padding: 12px;
    border-radius: 6px;
    display: none;
    font-weight: 500;
    text-align: center;
}

#crlv-upload-feedback.success {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
    display: block;
}

#crlv-upload-feedback.error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
    display: block;
}

/* BARRA DE PESQUISA */
.adel-search-bar {
    margin-bottom: 25px;
}

.adel-search-bar input {
    width: 100%;
    padding: 14px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1.1rem;
    color: #0f172a;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.adel-search-bar input:focus {
    outline: none;
    border-color: #3b82f6;
}

/* ── Cabeçalho da Tabela e Filtros ─────────── */
.adel-painel-topbar {
    background: #ffffff;
    padding: 20px 25px;
    margin-top: 20px;
    margin-bottom: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    display: flex;
    gap: 20px;
    align-items: flex-end;
    flex-wrap: wrap;
    border: none;
}

.adel-painel-info {
    display: flex;
    flex-direction: column;
    align-items: left;
    gap: 15px;
    flex: 1;
}

.adel-painel-info h3 {
    margin: 0;
    font-size: 25px;
    font-weight: 600;
    color: #333333;
    border: none;
    padding: 0;
}

.adel-badge-count {
    background: #f4f7f9;
    color: #888888;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 50px;
    width: fit-content;
}

.adel-painel-controls {
    display: flex;
    align-items: flex-end;
    gap: 20px;
}

.adel-filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.adel-filter-group label {
    font-size: 12px;
    font-weight: 700;
    color: #888888;
    text-transform: uppercase;
    margin: 0;
}

/* ── Tabela de Listagem ────────────────────── */
.adel-tabela-container {
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    border: none;
    margin-top: 0;
}

.adel-tabela {
    width: 100%;
    border-collapse: collapse;
    border: none !important;
    margin: 0px;
}

.adel-tabela thead, .adel-tabela thead tr {
    border: none !important;
    background: #f8fafb;
}

.adel-tabela th {
    padding: 20px;
    text-align: left;
    font-size: 14px;
    color: #666666;
    font-weight: 600;
    border: none !important;
}

.adel-tabela td {
    padding: 16px 20px;
    font-size: 14px;
    color: #333333;
    border: none !important;
    vertical-align: middle;
}

.adel-tabela tr:nth-child(even) { background-color: #fafbfc; }
.adel-tabela tr:hover { background-color: #f1f6f9; }

/* ── Botões de Ação na Tabela (Estrutura e Cores) ────────────────────── */
.adel-btn-previa,
.adel-btn-edit,
.adel-btn-delete,
a.adel-btn-table-download,
button.adel-btn-table-download {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    
    /* 1. As 4 linhas mágicas que forçam a mesma altura */
    height: 34px !important; 
    box-sizing: border-box !important; 
    padding: 0 14px !important; 
    line-height: 1 !important;
    
    border-radius: 6px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02) !important;
    margin: 0 !important;
    font-family: inherit !important;
}

/* Ver Prévia (Cinza/Neutro) */
.adel-btn-previa {
    background: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    color: #475569 !important;
}
.adel-btn-previa:hover {
    background: #f1f5f9 !important;
    border-color: #94a3b8 !important;
    color: #0f172a !important;
    transform: translateY(-1px);
}

/* Histórico (Usando estilo de Editar - Azul Vibrante) */
.adel-btn-edit {
    background: #3b82f6 !important;
    border: 1px solid #2563eb !important;
    color: #ffffff !important;
}
.adel-btn-edit:hover {
    background: #2563eb !important;
    border-color: #1d4ed8 !important;
    color: #ffffff !important;
    transform: translateY(-1px);
}

/* Download (Azul Claro) */
a.adel-btn-table-download, 
button.adel-btn-table-download {
    background-color: #eff6ff !important;
    border-width: 1px !important;
    border-style: solid !important;
    border-color: #bfdbfe !important;
    color: #3b82f6 !important;
}
a.adel-btn-table-download:hover, 
button.adel-btn-table-download:hover {
    background-color: #dbeafe !important;
    border-color: #93c5fd !important;
    color: #2563eb !important;
    transform: translateY(-1px) !important;
}

/* Lixeira (Vermelho Claro) */
.adel-btn-delete {
    background: #fef2f2 !important;
    border: 1px solid #fecaca !important;
    color: #ef4444 !important;
}
.adel-btn-delete:hover {
    background: #fee2e2 !important;
    border-color: #fca5a5 !important;
    color: #dc2626 !important;
    transform: translateY(-1px);
}

/* ==========================================
   MODAL DE HISTÓRICO (POP-UP FLUTUANTE)
   ========================================== */
.adel-modal {
    display: none; /* Escondido por padrão, o JS ativa */
    position: fixed;
    z-index: 999999; /* Fica acima de tudo no WordPress */
    left: 0;
    top: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(15, 23, 42, 0.7); /* Fundo escuro transparente */
    backdrop-filter: blur(4px); /* Desfoque moderno no fundo */
    align-items: center;
    justify-content: center;
}

.adel-modal-content {
    background-color: #ffffff;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: adelModalSlideIn 0.3s ease forwards;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.adel-modal-header {
    padding: 20px 25px;
    background-color: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.adel-modal-header h4 {
    margin: 0;
    font-size: 1.2rem;
    color: #0f172a;
    font-weight: 700;
}

.adel-modal-close {
    color: #64748b;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s;
}

.adel-modal-close:hover {
    color: #ef4444; /* Fica vermelho ao passar o mouse */
}

#adel-modal-body {
    padding: 25px;
    max-height: 60vh;
    overflow-y: auto; /* Scroll apenas dentro do pop-up se o histórico for gigante */
}

/* Estilo da lista de acessos dentro do pop-up */
.adel-log-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.adel-log-list li {
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.95rem;
    color: #334155;
}

.adel-log-list li:last-child {
    border-bottom: none;
}

/* Efeito de entrada (Animação) */
@keyframes adelModalSlideIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}