/**
 * admin-dashboard.css
 * Estilos exclusivos del Dashboard de SecureDocs
 */

.gestdoc-admin-wrapper .gestdoc-btn {
    transition: background 0.3s ease;
}

.gestdoc-admin-wrapper .gestdoc-btn:hover {
    background: #135e96 !important;
}

/* ============================================= */
/* SECURITY LOG BOX                              */
/* ============================================= */

.gestdoc-admin-wrapper .gestdoc-security-box {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    margin-top: 30px;
}

.gestdoc-admin-wrapper .gestdoc-security-header {
    width: 100%;
    margin-bottom: 20px;
}

.gestdoc-admin-wrapper .gestdoc-security-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 30px;
    width: 100%;
}

.gestdoc-admin-wrapper .gestdoc-security-text {
    min-width: 0;
    flex: 1;
}

.gestdoc-admin-wrapper .gestdoc-security-text h4 {
    margin: 0 0 8px 0;
}

.gestdoc-admin-wrapper .gestdoc-security-text p {
    margin: 0;
    color: #666;
    font-size: 13px;
    line-height: 1.6;
    max-width: 900px;
}

.gestdoc-admin-wrapper .gestdoc-security-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    flex-shrink: 0;
    margin-top: 0;
    min-width: 220px;
}

.gestdoc-admin-wrapper .gestdoc-security-total {
    background: #f3f4f6;
    height: 48px;
    padding: 0 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    width: 100%;
    box-sizing: border-box;
}

.gestdoc-admin-wrapper .gestdoc-btn-clear-logs {
    background: transparent;
    color: #555;
    border: 1px solid #e0e0e0;
    height: 34px;
    padding: 0 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.15s;
    white-space: nowrap;
    width: 100%;
    box-sizing: border-box;
}

.gestdoc-admin-wrapper .gestdoc-btn-clear-logs:hover {
    background: #dc3545;
    color: white;
    border-color: #dc3545;
}

.gestdoc-admin-wrapper .gestdoc-security-scroll {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #eee;
    border-radius: 10px;
}

.gestdoc-admin-wrapper .gestdoc-security-table {
    width: 100%;
    border-collapse: collapse;
}

.gestdoc-admin-wrapper .gestdoc-security-table thead th {
    position: sticky;
    top: 0;
    background: #f9fafb;
    z-index: 20;
}

.gestdoc-security-table th,
.gestdoc-admin-wrapper .gestdoc-security-table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
    text-align: left;
    font-size: 13px;
}

/* Anchos de columnas */
.gestdoc-security-table th:nth-child(1),
.gestdoc-security-table td:nth-child(1) { width: 140px; }

.gestdoc-security-table th:nth-child(2),
.gestdoc-security-table td:nth-child(2) { width: 200px; }

.gestdoc-security-table th:nth-child(3),
.gestdoc-security-table td:nth-child(3) { width: 180px; }

.gestdoc-security-table th:nth-child(4),
.gestdoc-security-table td:nth-child(4) { width: auto; }

/* ============================================= */
/* BADGES                                        */
/* ============================================= */

.gestdoc-admin-wrapper .gestdoc-badge-danger {
    background: #fee2e2;
    color: #991b1b;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.gestdoc-admin-wrapper .gestdoc-badge-warning {
    background: #fef3c7;
    color: #92400e;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.gestdoc-admin-wrapper .gestdoc-security-empty {
    background: #ecfdf5;
    color: #065f46;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    font-weight: 600;
}

/* ============================================= */
/* CLEANUP BOX                                   */
/* ============================================= */

.gestdoc-admin-wrapper .gestdoc-cleanup-box {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    margin-top: 30px;
}

.gestdoc-admin-wrapper .gestdoc-cleanup-text h4 {
    margin: 0 0 8px 0;
}

.gestdoc-admin-wrapper .gestdoc-cleanup-text p {
    margin: 0;
    color: #666;
    font-size: 13px;
    line-height: 1.6;
}

.gestdoc-cleanup-scroll::-webkit-scrollbar { width: 8px; height: 8px; }
.gestdoc-cleanup-scroll::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 10px; }
.gestdoc-cleanup-scroll::-webkit-scrollbar-thumb { background: #888; border-radius: 10px; }
.gestdoc-cleanup-scroll::-webkit-scrollbar-thumb:hover { background: #555; }

.gestdoc-admin-wrapper .gestdoc-cleanup-btn {
    transition: background 0.2s;
}

.gestdoc-admin-wrapper .gestdoc-cleanup-btn:hover {
    background: #b91c1c !important;
}

/* ============================================= */
/* RESPONSIVE                                    */
/* ============================================= */

@media (max-width: 900px) {
    .gestdoc-admin-wrapper .gestdoc-security-top {
        flex-direction: column;
        align-items: stretch;
    }
.gestdoc-admin-wrapper .gestdoc-security-actions {
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .gestdoc-cleanup-table th,
.gestdoc-admin-wrapper .gestdoc-cleanup-table td {
        font-size: 12px;
        padding: 8px;
    }
}